I have several fields added to a panel and i want to on a button click check the fields that are required as a means of validation. I understand that if using a
Form
element, then all i need to do is call
Commit
on each component which will validate the required fields. I want to accomplish the same thing but i am not using a Vaadin Form.
Can i get all the components in my layout and then loop through each component and check if the required components are empty, then i can handle it in whatever way i want?
How do i iterate over each component in an
AbsoluteLayout
?
I am using EclipseLInk JPA as my ORM provider and i couldn’t get Vaadin form to work with it. I ended up adding each textfield to a
set<textfield>
and checked the
isValid
method as a workaround.
The component iterator returns all components in the layout and i was only looking for the textfields.