Examples of LocaleProvider


Examples of com.opensymphony.xwork.LocaleProvider

        {
            Object o = iterator.next();

            if (o instanceof LocaleProvider)
            {
                LocaleProvider lp = (LocaleProvider) o;
                result = lp.getLocale();

                break;
            }
        }
View Full Code Here

Examples of com.opensymphony.xwork.LocaleProvider

        {
            Object o = iterator.next();

            if (o instanceof LocaleProvider)
            {
                LocaleProvider lp = (LocaleProvider) o;
                result = lp.getLocale();

                break;
            }
        }
View Full Code Here

Examples of com.opensymphony.xwork2.LocaleProvider

    Locale result = null;
    OgnlValueStack stack = (OgnlValueStack) ActionContext.getContext().getValueStack();

    for (Object o : stack.getRoot()) {
      if (o instanceof LocaleProvider) {
        LocaleProvider lp = (LocaleProvider) o;
        result = lp.getLocale();
        break;
      }
    }

    // Falling back to the request locale
View Full Code Here

Examples of com.opensymphony.xwork2.LocaleProvider

        }

        String content_type = request.getContentType();
        if (content_type != null && content_type.contains("multipart/form-data")) {
            MultiPartRequest mpr = getMultiPartRequest();
            LocaleProvider provider = getContainer().getInstance(LocaleProvider.class);
            request = new MultiPartRequestWrapper(mpr, request, getSaveDir(servletContext), provider);
        } else {
            request = new StrutsRequestWrapper(request, disableRequestAttributeValueStackLookup);
        }
View Full Code Here

Examples of com.opensymphony.xwork2.LocaleProvider

            if (bundle != null) {
                final Locale locale = (Locale) getStack().getContext().get(ActionContext.LOCALE);
                TextProviderFactory tpf = new TextProviderFactory();
                container.inject(tpf);
                textProvider = tpf.createInstance(bundle, new LocaleProvider() {
                    public Locale getLocale() {
                        return locale;
                    }
                });
                getStack().push(textProvider);
View Full Code Here

Examples of com.opensymphony.xwork2.LocaleProvider

    private TextProvider getTextProvider(Object action) {
        TextProviderFactory tpf = new TextProviderFactory();
        if (container != null) {
            container.inject(tpf);
        }
        LocaleProvider localeProvider = getLocaleProvider(action);
        return tpf.createInstance(action.getClass(), localeProvider);
    }
View Full Code Here

Examples of com.opensymphony.xwork2.LocaleProvider

        LocaleProvider localeProvider = getLocaleProvider(action);
        return tpf.createInstance(action.getClass(), localeProvider);
    }

    private LocaleProvider getLocaleProvider(Object action) {
        LocaleProvider localeProvider;
        if (action instanceof LocaleProvider) {
            localeProvider = (LocaleProvider) action;
        } else {
            localeProvider = container.getInstance(LocaleProvider.class);
        }
View Full Code Here

Examples of com.opensymphony.xwork2.LocaleProvider

                bundle = LocalizedTextUtil.findResourceBundle(name, (Locale) getStack().getContext().get(ActionContext.LOCALE));
            }

            if (bundle != null) {
                final Locale locale = (Locale) getStack().getContext().get(ActionContext.LOCALE);
                getStack().push(new TextProviderSupport(bundle, new LocaleProvider() {
                    public Locale getLocale() {
                        return locale;
                    }
                }));
                pushed = true;
View Full Code Here

Examples of com.opensymphony.xwork2.LocaleProvider

        {
            Object o = iterator.next();

            if (o instanceof LocaleProvider)
            {
                LocaleProvider lp = (LocaleProvider) o;
                result = lp.getLocale();

                break;
            }
        }
View Full Code Here

Examples of com.opensymphony.xwork2.LocaleProvider

        }

        String content_type = request.getContentType();
        if (content_type != null && content_type.contains("multipart/form-data")) {
            MultiPartRequest mpr = getMultiPartRequest();
            LocaleProvider provider = getContainer().getInstance(LocaleProvider.class);
            request = new MultiPartRequestWrapper(mpr, request, getSaveDir(servletContext), provider);
        } else {
            request = new StrutsRequestWrapper(request, disableRequestAttributeValueStackLookup);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.