[
https://issues.apache.org/jira/browse/TRINIDAD-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gabrielle Crawford resolved TRINIDAD-2139.
------------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.2-core
Assignee: Gabrielle Crawford
> Client NumberConverter with type=percent ignores maxfractiondigits when
> formatting
> ----------------------------------------------------------------------------------
>
> Key: TRINIDAD-2139
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2139
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Components
> Affects Versions: 2.0.0-core
> Reporter: Yee-Wah Lee
> Assignee: Gabrielle Crawford
> Priority: Minor
> Fix For: 2.0.2-core
>
> Attachments: trunk_2139_numberPercentMaxFrac.diff
>
>
> NumberFormat.js contains the following code:
> TrNumberFormat.prototype.percentageToString = function(number)
> {
> number = number * 100;
> number = this.getRounded(number);
> .. number = this.numberToString(number);
> }
> consideration the number of fractionDigits but numberToString later will.
> TrNumberFormat.prototype.getRounded = function(val)
> {
> val = this.moveDecimalRight(val);
> val = Math.round(val);
> val = this.moveDecimalLeft(val);
> return val;
> }
> Math.round function will round to the nearest integer. With the earlier
> multiplication to 100, precision is preserved to at most two digits,
> regardless of the maxFractionDigits attribute.
--
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