You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marco Aurélio Silva <ma...@gmail.com> on 2008/02/13 17:53:56 UTC

Formated integer in TextField

Hi All

I'm having a problem with TextField on wicket 1.2.6.

I must format the integer numbers, so, when the number is 123456780 it will
be formated as 123,456,789 or 123.456.789 (according to user locale). The
problem is that when I submit the form, the validation fails because
123,456,789 is not a valid integer number.
Is there a way to solve this?
Thanks in advance!
Marco

Re: Formated integer in TextField

Posted by Igor Vaynberg <ig...@gmail.com>.
you can write a converter that strips any commas/periods from input.
override getconverter() on the textfield.

-igor


On Feb 13, 2008 8:53 AM, Marco Aurélio Silva <ma...@gmail.com> wrote:
> Hi All
>
> I'm having a problem with TextField on wicket 1.2.6.
>
> I must format the integer numbers, so, when the number is 123456780 it will
> be formated as 123,456,789 or 123.456.789 (according to user locale). The
> problem is that when I submit the form, the validation fails because
> 123,456,789 is not a valid integer number.
> Is there a way to solve this?
> Thanks in advance!
> Marco
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org