f:convertNumber conversion is not symmetric when currencyCode and currencySymbol are used -----------------------------------------------------------------------------------------
Key: MYFACES-2970 URL: https://issues.apache.org/jira/browse/MYFACES-2970 Project: MyFaces Core Issue Type: Bug Components: JSR-127, JSR-252, JSR-314 Affects Versions: 2.0.2, 1.2.9, 1.1.8 Reporter: Leonardo Uribe Assignee: Leonardo Uribe Checking some code on myfaces commons, I notice f:convertNumber conversion is not symmetric when currencyCode and currencySymbol are used. The problem can be seen when an application has one locale, but you require the field read a different currency for the default one. The solution is call formatCurrency too from getAsObject method. It seems MyFaces implements the javadoc description for NumberConverter without think carefully if that description was complete or not. On getAsString it says: "...If the type is set to currency, it is also possible to configure the currency symbol to be used, using either the currencyCode or currencySymbol properties. If both are set, the value for currencyCode takes precedence on a JDK 1.4 (or later) JVM; otherwise, the value for currencySymbol takes precedence...." But if that so, and getAsObject receive the string formatted with the previous rule, it should take into account the configured currencyCode/currencySymbol. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.