[
https://issues.apache.org/jira/browse/TRINIDAD-2496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ashwin Prabhu updated TRINIDAD-2496:
------------------------------------
Status: Patch Available (was: Open)
> Support custom negative prefix and suffix on af:convertNumber
> -------------------------------------------------------------
>
> Key: TRINIDAD-2496
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2496
> Project: MyFaces Trinidad
> Issue Type: Improvement
> Components: Components
> Reporter: Ashwin Prabhu
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> This is an enhancement request of af:convertNumber (converter class is
> NumberConverter) to support additional conversion function for negative
> numbers.
> It is expected to enhance af:convertNumber (converter class is
> NumberConverter) to support the following:
> 1. new attribute of negativePrefix and negativeSuffix
> 2. parsing/formatting support in both client and server side using negative
> prefix/suffix
> --------------------------------------------------------------------------------------
> Problem description:
> Financial applications sometimes require that negative numbers be displayed
> within () instead of the usual -ve prefix. Ex: -1234 as (1234).
> Currently Trinidad based applications can achieve this by specifying a
> pattern on the number converter, like for example "#;(#)". This works, but
> the caveat is that patterns are not processed by the client converter. So
> essentially to parse and format numbers, the application must wait until the
> input is eventually submitted to the server or perform a auto-submit to
> expedite the validation. Performing auto-submit to validate the input for
> converter pattern compliance is noticeably slow and wastes a server round
> trip. So the request is to enhance the client converter to parse/format
> numbers with suffix/prefix on the client and this should work for all types:
> number, percent, currency(already works).
--
This message was sent by Atlassian JIRA
(v6.2#6252)