Ive heard, about NumberTextField, and a parametrized Textfield. But Im looking for something that validate if there is a number on the textbox, and instead of throw an exception it should show error on feedback panel. What is the solution for this?
Ive heard, about NumberTextField, and a parametrized Textfield. But Im looking for something that
Share
if you parameterize your textfield with
TextField<Integer>, you will get a feedbackmessage that the input is not valid for type Integer. You should also parameterize the model object with integer. thats it, thats all you need to do. you do not need any custom validation.you can also use some standard number validators like
RangeValidator<Integer>if you need some extended validation.