Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Group all the textFields in an array
Hi guys, I need to perform some validation on the textFields used in an application, and I though, to check whether they're all empty or not, I'd group them in an array and do it this way which seems rather fast. So, if I wanted to find the number of textFields used, how would I go about that? I checked the API but I couldn't find any method like .length() for the textField. Any suggestion? Thanks
have you considered using a FieldGroup? You could then add a Validator to your textFields that checks that they are not empty. See
for more info.
hi thanks, I had no idea :-). I've found this though which is rather interesting, old, but interesting and it seems to work https://vaadin.com/forum#!/thread/2197093
If it works, it works ;)
No worries, thanks for your contribution though :-), I might use that if I get stuck with the solution I've found!