You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Yee-Wah Lee <ye...@oracle.com> on 2011/10/19 21:19:01 UTC
[Trinidad] Feedback for Trinidad-2144: NumberConverter format hint
changes
Hi everyone,
I have some suggestions for changing the numberConverter's format hint which I would like to hear your feedback on.
https://issues.apache.org/jira/browse/TRINIDAD-2144
Currently the numberConverter provides a hint using the converter's pattern like this: "Sample pattern: ##.##". In particular, it follows JDK DecimalFormat's convention when the pattern is locale-independent, .ie "." as decimal separator and "," as grouping-separator.
This has the following issues which could confuse users
- It does not check if the trinidad-config parameters decimal-separator, number-grouping-separator are set.
http://myfaces.apache.org/trinidad/devguide/configuration.html#trinidad-config.xml
- It does not substitute the locale-specific character
Therefore, I suggest the following.
1. Introduce two new trinidad-config parameters for currency-decimal-separator, currency-number-grouping-separator
This is because some locales have different conventions for decimal separator when inside a currency. If not set, default to decimal/grouping-separator values.
2. If no parameters set in trinidad-config, substitute the locale-specific decimal/grouping separators.
3. Use a sample number instead of presenting the pattern, e.g. "Sample pattern: 12,34" instead of "Sample pattern: ##.##".
Does anyone have feedback on suggestions #1, 2, 3?
Thank you,
Yee-Wah