cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35845] - locale attribute in <formatDate> is not used in JXTemplateGenerator
Date Mon, 25 Jul 2005 11:09:38 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35845>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35845





------- Additional Comments From henric@trillian.se  2005-07-25 13:09 -------
The suggested solution above is not that good in the following example:

<formatDate value="${date}" locale="${locale}"/>

where ${locale} is an actual Locale object. Since this probably is the "normal"
way of using the tag, it may be better to solve this bug in this way instead:

    // First try to get the Locale as a Locale object
    Object locVal = getValue(this.locale, jexl, jxp);
    // If the locale wasn't a Locale object, try getting it as
    // a String with getStringValue
    if (locVal == null) {
        locVal = getStringValue(this.locale, jexl, jxp);
    }

or similar...

Best regards
Henric Müller

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Mime
View raw message