You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Yee-Wah Lee (Commented) (JIRA)" <de...@myfaces.apache.org> on 2011/10/19 20:03:11 UTC

[jira] [Commented] (TRINIDAD-2144) NumberConverter formatHint does not consider trinidad-config.xml settings for decimal-separator, number-grouping-separator

    [ https://issues.apache.org/jira/browse/TRINIDAD-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130826#comment-13130826 ] 

Yee-Wah Lee commented on TRINIDAD-2144:
---------------------------------------

Some additional suggestions for the group to consider

1. Add two parameters for currency decimal separator, currency grouping separator instead of using the existing decimal separator/grouping separator.
Some locales have different conventions for the two, e.g. Estonian, Farsi, Kazakh and Cyrillic Kyrgyz

2. When trinidad config parameters are not specified, substitute the locale-specific decimal separator/grouping separator, e.g. French  locale uses "," for decimal separator instead of "."

3. Instead of displaying the format in the message, e.g. "Sample pattern: ##.##", display a number, e.g. "Sample pattern: 45.67"
                
> NumberConverter formatHint does not consider trinidad-config.xml settings for decimal-separator, number-grouping-separator
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-2144
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2144
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.0-core
>            Reporter: Yee-Wah Lee
>            Priority: Minor
>
> 1. In trinidad-config.xml, set the following parameters
>   <decimal-separator>','</decimal-separator>
>   <number-grouping-separator>'\''</number-grouping-separator>
> 2. Run convertValidate.jspx from the demo. The number is correctly formatted, e.g. 2'00
>               <tr:inputText value="#{converterValidator.bigDecimalValue}" >
>                 <f:convertNumber groupingUsed="false" pattern="#,##0.00"/>
>               </tr:inputText>
> 3. Change the number into something invalid and submit the page. The error message just shows the pattern without the locale-specific separators substituted into the decimal (.) and number-grouping(,) separators, e.g. The format of the number must match this pattern: #,##0.00. This is misleading since the user must substitute the correct separators from trinidad-config.xml before parsing will succeed. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira