Data validation in Table


When I enter edit mode of my Table, I want to have data validation on all fields.

I am using Vaadin 7, so the Bean Validation addon sadly won’t work.

I have a perfectly working table for which I am using a BeanItemContainer to keep my Person beans inside.

I added a BeanValidator to the table, like so:

table.addValidator(new BeanValidator(Person.class, "firstName"));

Now, when I run the application, I get this error:

com.vaadin.server.ServiceException: java.lang.IllegalArgumentException: [] is not a valid value for property firstName of type class com.some.path.vaadinpoc.sampleapp.web.Person

How am I supposed to add BeanValidators to all of my tables fields?

I tried adding a BeanValidator to a TextField and that worked.

Please advice
Thanks in advance!