I've been thinking that translators need to be configurable, like
validators, so that you can specify the desired precision.

On Wed, May 6, 2009 at 5:45 AM, Ulrich Stärk <[email protected]> wrote:
> Hi,
>
> the new local-aware numeric translator acquires a NumberFormat instance by
> calling NumberFormat.getNumberInstance(locale). That way a DecimalFormat is
> returned that limits the number of decimal places to 3. If a user enters
> more than 3 decimal places these get stored correctly but aren't displayed
> correctly. Instead they get rounded to 3 places. This causes problems if in
> a subsequent edit he doesn't enter the number again correctly (he might
> instead just be interested in editing some other property) resulting in the
> rounded number being submitted. Since there is no mechanism for users to
> override the format, this is quite a serious limitation.
>
> Does anything speak against calling
> nf.setMaximumFractionDigits(Integer.MAX_VALUE); before returning the
> NumberFormat? That would solve the issue.
>
> Uli
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to