portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabio Latrofa" <flatr...@sivaspa.com>
Subject JetspeedL10NTag
Date Fri, 28 Mar 2003 14:46:27 GMT
I would like to suggest a little changing to the JetspeedL10NTag class. The
idea is to use JetspeedLocalizationService getLocale(Rundata) method to
obtain the localized key string.

    ...
    public int doStartTag() throws JspException
    {
        JetspeedRunData data = (JetspeedRunData)
pageContext.getAttribute(JspService.RUNDATA, PageContext.REQUEST_SCOPE);

        JetspeedLocalizationService jls = (JetspeedLocalizationService)
TurbineServices.getInstance().getService(LocalizationService.SERVICE_NAME);

        try
        {
            ConcreteElement result = null;
            try
            {
                result = new StringElement(Localization.getString(this.key,
jls.getLocale(data)));

    ...

I've tried it and seems to work. What do you think about it?

Regards,

Fabio Latrofa


Questa e-mail e' stata verificata dal sistema di antivirus della Siva S.P.A.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message