You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Gareth Evans (JIRA)" <ji...@apache.org> on 2006/05/15 13:43:16 UTC

[jira] Commented: (STR-794) The bean:message tag should accept Objects as arguments

    [ http://issues.apache.org/struts/browse/STR-794?page=comments#action_37360 ] 

Gareth Evans commented on STR-794:
----------------------------------

Can someone please explain why this is marked as "Not a problem" ? This bug does still exist within the latest release (1.2.9) and it does impair functionality.  It appears to be a very straight forward change ( changing the String parameters to Objects ).

The problem is that when trying to format messages using the java standard http://java.sun.com/j2se/1.4.2/docs/api/java/text/MessageFormat.html, you are unable to handle dates as parameters as the conversion to a String calls the Date.toString().

I noticed that a work around has been suggested using fmt:message but surely this is core struts functionality?

> The bean:message tag should accept Objects as arguments
> -------------------------------------------------------
>
>          Key: STR-794
>          URL: http://issues.apache.org/struts/browse/STR-794
>      Project: Struts Action 1
>         Type: Improvement

>   Components: Taglibs
>     Versions: Nightly Build
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Erik Godding Boye
>     Assignee: David Graham
>     Priority: Minor
>      Fix For: 1.1.1
>  Attachments: MessageTag-arg-Object.diff
>
> I would suggest that the bean:message tag is changed to accept Objects as 
> arguments, not only Strings. The problem with this becomes apparent when you 
> want to present localized dates, numbers or currencies as part of your 
> localized messages. The MessageTag implementation uses MessageFormat internally 
> (which uses an array of Objects as arguments), so there should be no problems 
> changing the interface. Please refer to a FAQ entry on jGuru 
> (http://www.jguru.com/faq/view.jsp?EID=915891) for additional information.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira