You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jordan Redner <jr...@shopping.com> on 2005/01/11 18:23:45 UTC

Locale specifc NumericField formatting?

Is there a way to format what the NumericField renders in the page.

The type is java.lang.Float, but I'd like to render & read the input as
a currency with the appropriate currency formatting for a Locale.

Has anyone done this?

Thanks very much in advance,


Jordan



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Locale specifc NumericField formatting?

Posted by Paul Ferraro <pm...@columbia.edu>.
Unfortunately, Tapestry 3.0 does not include a built-in validator with 
this functionality.  3.1 will address the shortcomings of the current 
form validation mechanisms.  Until then, you can create your own 
java.text.DecimalFormat-based validator fairly easily by extending 
BaseValidator and using the ValidField component with your custom 
IValidator.

Paul

Jordan Redner wrote:

>Is there a way to format what the NumericField renders in the page.
>
>The type is java.lang.Float, but I'd like to render & read the input as
>a currency with the appropriate currency formatting for a Locale.
>
>Has anyone done this?
>
>Thanks very much in advance,
>
>
>Jordan
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org