Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
TextField and logical model
Hello,
we consider to use Vaadin in our new applications.
Now we evaluate Vaadin.
First thing I miss after reading "book of vaadin" is TextField with support for entering only numbers.
We have rich logical model - so we know on every field how length is it, if it is number, if it is decimal number, how precise is decimal number, etc..
For string with max length "varchar(10)" - TextField.setMaxLength() is fine solution.
For numbers "numeric(4,0)" or "numeric(16,2)" - I cant find any solution.
I find some BETA NumericTextField in addons directory, but this is so key function that I am surprised it is not in core vaadin.
Is there any standard solution? Allow users to enter mess and check it on serverside is no go for us!
You could try using the CSValidation add-on. It is a TextField that allows the user to do client-side validation user regexp or javascript. Remember that client-side validation is only meant for enabling a more user friendly UI, you should always validate the data on the server side as well (at latest when the data is processed).
Yes, this component with "number.setPreventInvalidTyping(true)" is solution.