Package org.fenixedu.academic.ui.struts

Examples of org.fenixedu.academic.ui.struts.StrutsMessageResourceProvider


                (LabelFormatter) TagUtils.getInstance().lookup(this.pageContext, this.name, this.property, this.scope);

        final JspWriter out = this.pageContext.getOut();

        try {
            out.write(labelFormatter.toString(new StrutsMessageResourceProvider(this.properties, getUserLocale(),
                    this.pageContext.getServletContext(), (HttpServletRequest) this.pageContext.getRequest())));
        } catch (IOException e) {
            throw new JspException(e);
        }
View Full Code Here


    }

    protected String[] solveLabelFormatterArgs(HttpServletRequest request, LabelFormatter[] labelFormatterArgs) {
        final String[] args = new String[labelFormatterArgs.length];
        int i = 0;
        final StrutsMessageResourceProvider messageResourceProvider = getMessageResourceProvider(request);
        for (final LabelFormatter labelFormatter : labelFormatterArgs) {
            args[i++] = labelFormatter.toString(messageResourceProvider);
        }

        return args;
View Full Code Here

        return args;
    }

    protected StrutsMessageResourceProvider getMessageResourceProvider(HttpServletRequest request) {
        final StrutsMessageResourceProvider strutsMessageResourceProvider =
                new StrutsMessageResourceProvider(getLocale(request), getServlet().getServletContext(), request);
        for (final Entry<String, String> entry : getMessageResourceProviderBundleMappings().entrySet()) {
            strutsMessageResourceProvider.addMapping(entry.getKey(), entry.getValue());
        }

        return strutsMessageResourceProvider;
    }
View Full Code Here

        addActionMessages(ActionMessages.GLOBAL_MESSAGE, request, messages);
    }

    protected void addActionMessages(final String propertyName, final HttpServletRequest request,
            final Collection<LabelFormatter> messages) {
        final StrutsMessageResourceProvider messageResourceProvider = getMessageResourceProvider(request);

        for (final LabelFormatter each : messages) {
            addActionMessageLiteral(propertyName, request, each.toString(messageResourceProvider));
        }
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.ui.struts.StrutsMessageResourceProvider

Copyright © 2018 www.massapicom. 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.