[
https://issues.apache.org/jira/browse/TRINIDAD-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141177#comment-15141177
]
Mike Kienenberger commented on TRINIDAD-2533:
---------------------------------------------
We don't have any active Trinidad committers currently. If you provide a patch
in unified diff format from the root of the project, I will apply it. I've
applied a number of IE11 fixes supplied by the community recently.
If you would like assistance in tracking down the problem and creating a
solution, I recommend posting a message on the dev@myfaces mailing list to see
if any other JSF developers have an idea.
> TrNumberFormat doesn't parse native Numbers without Currency
> ------------------------------------------------------------
>
> Key: TRINIDAD-2533
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2533
> Project: MyFaces Trinidad
> Issue Type: Bug
> Affects Versions: 2.0.0-beta-2
> Environment: Oracle ADF
> Reporter: Falco Wockenfuß
>
> If you enter a Number in a Currency-Field with a decimal separator (other
> than ".") and without trailing currency symbol you get a parse Error.
> Test Case - Type in JS Console:
> var tr = new TrNumberConverter( null, "currency", "de_DE" );
> tr.getAsObject( "20,50" ); // Parse Error
> tr.getAsObject( "20,50 €" ); // Working
> tr.getAsObject( "20" ); // Working
> Cause:
> The Method TrNumberFormat.prototype.removePrefixAndSuffix will fail, if not
> both matching Prefix and Suffix for Positive or Negative are present. If only
> one of both is present an exception is thrown and parsing fails.
> Since the Prefix for positive Currency is "" (the empty string) it will
> always match and try to find the matching suffix "€" or fail.
> In the case of an exception the default parseFloat is used as a fallback,
> which works for default english notation, so plain Numbers and using the dot
> as a decimal separator will work.
> Expected Behaviour and proposed Fix:
> Entering a locale Numberformat without Currency Symbol should be parsed
> without giving an error. The removePrefixAndSuffix Method should be more
> lenient and also accept input without currency suffix.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)