Combining it with custom Behavior should do the trick

W dniu 2017-10-24 o 16:52, Maxim Solodovnik pisze:
I believe by overriding textFormat you can customize the way number is
being displayed
And the way text is being converted to number inside wicket.

to format field data while user prints you need to use JS llibrary
for ex. this one looks
promising ....

On Tue, Oct 24, 2017 at 8:00 PM, Kamil Paśko <> wrote:


I tried with:

     private final class MyFormattedField extends TextField<String>
implements ITextFormatProvider {
         private MyFormattedField(String id, IModel<String> model) {
             super(id, model);

         public String getTextFormat() {
             return "### ###.###";

but this doesn't do anything.

user can type "12321321321" and value is not formatted

W dniu 2017-10-24 o 14:37, Maxim Solodovnik pisze:

I believe you can override "getTextFormat <
method and provide your own format
According to right align: you can use CSS class for that :)

On Tue, Oct 24, 2017 at 6:52 PM, Kamil Paśko <
<>> wrote:

     Dear Wicket user group,

     I have a TextField (but I can use NumberTextField as well) and
     when user types a number I want that:

     1) number is positioned to the right

     2) thousands are separated by spaces

     3) floating point character is "."

     How can I "force" that format in a TextField?

     Kind regards,


Maxim aka solomax

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to