myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yee-Wah Lee (JIRA)" <>
Subject [jira] [Commented] (TRINIDAD-2354) convertNumber type=percent server and client results differ.
Date Thu, 24 Jan 2013 22:51:13 GMT


Yee-Wah Lee commented on TRINIDAD-2354:

On the server, creating a NumberFormat with type= percent has maxFractionDigits = 0

However, on the client, the default maxFractionDigits=3. So the defaults need to be changed
in TrNumberFormat() constructor.

Also, the following code which creates a NumberFormat instance to parse the percent/currency
string should copy the max/min Integer/FractionDigits values.
      // The user could have just left off the percent/currency symbol, so try  parsing 'numberString'
as a Number instead; if it still fails, then
      // throw a converter exception.
        numberString =

> convertNumber type=percent server and client results differ. 
> -------------------------------------------------------------
>                 Key: TRINIDAD-2354
>                 URL:
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>            Reporter: Yee-Wah Lee
>            Priority: Minor
> 1. Create an inputText with child numberConverter, type=percent. Or, see example here:
> 2. Enter 2.75 into the input field and Submit
> 2a.  The client converter initially changes it to "2.75%" 
> 2b. After the server returns, it displays as "3%".

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message