[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3774) Interpolator does not support # in choice/MessageFormat does
Guy Di Fulvio (JIRA)
jira-events at lists.jboss.org
Wed Jan 14 03:39:04 EST 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-3774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12447704#action_12447704 ]
Guy Di Fulvio commented on JBSEAM-3774:
---------------------------------------
It seams the issue has been fixed in 2.1.0, I checked the code. The problem was occuring when params where null and MessageFormat was expecting params. The fix is the following:
if (params.length == 0)
{
builder.append(expr.toString());
}
else
{
String value = new MessageFormat(expr.toString(), Locale.instance()).format(params);
builder.append(value);
}
In 2.0.3CR1 the test on params.length was not there... try to use MessageFormat with a choice and a params length to 0 and you will see.
So we can say it is fixed.
> Interpolator does not support # in choice/MessageFormat does
> ------------------------------------------------------------
>
> Key: JBSEAM-3774
> URL: https://jira.jboss.org/jira/browse/JBSEAM-3774
> Project: Seam
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.3.CR1, 2.1.0.CR1
> Reporter: Guy Di Fulvio
> Assignee: Norman Richards
> Priority: Minor
> Fix For: 2.1.2.CR1
>
>
> In my properties file:
> my.choice.message = {0,choice,0#No choice|1# 1 choice|1< {0,number,integer} choices}
> This is working with MessageFormat but Interpolator returns only {0} and my choices are lost.
> After checking the code the problem is coming from the #.
--
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