[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-2499) Seam Messages strips any MessageFormat formatting parameters

Pete Muir (JIRA) jira-events at lists.jboss.org
Tue Sep 16 18:09:21 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBSEAM-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Muir closed JBSEAM-2499.
-----------------------------

    Resolution: Done


Done, now we don't try to format a message if there are no params passed (leave it up to JSF).

> Seam Messages strips any MessageFormat formatting parameters
> ------------------------------------------------------------
>
>                 Key: JBSEAM-2499
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-2499
>             Project: Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0.GA
>            Reporter: Calvin Yu
>            Assignee: Pete Muir
>             Fix For: 2.1.0.CR1
>
>
> I want to use f:outputFormat to format text so that I can specify the formatting style from resource bundles.
> In messages.properties:
> foo=Howdy {0}\!  The time is {1, date, MMMM dd}
> In my Facelets view:
> <h:outputFormat value="#{messages['foo']}">
>   <f:param value="#{exampleAction.name}"/>
>   <f:param value="#{exampleAction.date}"/>
> </h:outputFormat>
> The result of '#{messages['foo']}' is actually: Howdy {0}\!  The time is {1}
> The reason this is happening is because the Interpolator is using MessageFormat to evaluate {1, date, MMMM dd} with empty parameters (line #141 in Interpolator.java), which results in just {1}.

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

        



More information about the seam-issues mailing list