[
https://issues.apache.org/jira/browse/TRINIDAD-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518542
]
Jeanne Waldman commented on TRINIDAD-145:
-----------------------------------------
Ok, I'll fix that and check it in.
I was focusing on the dummy ELContext, which I still don't understand how that
is working. I guess the ValueExpression doesn't really need it?
> ClassCastException when binding number-grouping-separator
> ---------------------------------------------------------
>
> Key: TRINIDAD-145
> URL: https://issues.apache.org/jira/browse/TRINIDAD-145
> Project: MyFaces Trinidad
> Issue Type: Bug
> Affects Versions: 1.2.1-core
> Reporter: Jeanne Waldman
> Assignee: Jeanne Waldman
> Attachments: LazyValueExpressionPatch.patch,
> LazyValueExpressionPatch2.patch, UnwrapStringToCharPatch.patch,
> UnwrapStringToCharPatch2.patch
>
>
> In trinidad-config.xml, set this:
> <number-grouping-separator>#{view.locale.language=='de' ? 'o' :
> 'x'}</number-grouping-separator>
> Run a page.
> You'll get a ClassCastException trying to cast a String to a Character in
> RequestContextImpl in this code:
> @Override
> public char getNumberGroupingSeparator()
> {
> Character c = (Character) _bean.getProperty(
> RequestContextBean.NUMBER_GROUPING_SEPARATOR_KEY);
> if (c != null)
> return c.charValue();
> return (char) 0;
> }
> This is a problem in both the 1.2.1 branch and the Trunk.
> Adam suggested as a fix:
> @ In 1.1, we should be unwrapping the String into a Character.
> @ In 1.2, we should change LazyValueBinding to LazyValueExpression and take
> @ advantage of the automatic coercion in ValueExpressions.
> I have a patch for the 1.2 version that I will upload soon for review.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.