struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 20466] New: - bean:message should accept Object args instead of String args
Date Wed, 04 Jun 2003 08:16:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20466>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20466

bean:message should accept Object args instead of String args

           Summary: bean:message should accept Object args instead of String
                    args
           Product: Struts
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: bert.scheel@dhl.com


Problem:
<bean:message key="format.date" arg0="<%=new java.util.Date()%>"/>
with format.date={0,date,medium} should result in a message of the form
04.06.2003 in german locale but it results in an error.
To use the full capabilities of MessageFormat you must be able to provide 
Object arguments.
Solution:
Change the type of arg0 - arg3 from String to Object 
in ../taglib/bean/MessageTag.java. This will have no consequences on the 
interface or documentation of the message tag.
Remark:
A bug in ../util/MessageResources.java results in the usage of the default 
Locale.

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


Mime
View raw message