Ashwin Prabhu created TRINIDAD-2511:
---------------------------------------

             Summary: rounding mode is not honoured on the client while using 
number converter
                 Key: TRINIDAD-2511
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2511
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions: 2.1.0-core
            Reporter: Ashwin Prabhu


When rounding mode is specified on af:convertNumber, decimal truncation 
affected by min/max fraction digits should be governed by the rounding mode 
specified. 

Currently client side number converter (TrNumberConverter) performs decimal 
truncation when maxFractionDigits is specified without considering the rounding 
mode chosen. This leads to data inconsistencies when af:convertNumber is 
attached to input components. 

For ex:
<tr:inputText label="Label 1" id="it1"> 
<tr:convertNumber type="number"  roundingMode="UP" maxFractionDigits="2"/> 
</tr:inputText> 

the above converts 5.551 to 5.55, wheras the correct rounding should have been 
5.56, since the rounding mode is UP.

Since he server side converter correctly implements rounding, the issue does 
not arise when the converter is attached to output components.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to