How to make business validations on fields in editable Table?


Here is the deal: I have a Table who uses a BeanItemContainer of “MyBean”. “MyBean” is not really relevant, it contains only 1 String and 2 Date objects.
But the user must be allowed to change theses values for each instance of MyBean in my container.

To do that, it’s easy, just do myTable.setEditable(true). Or a little bit more complex, create a Table.ColumnGenerator who returns a Field (add a ValueChangeListener to push the new value inside the bean).
With the Table.ColumnGenerator, I’m also able to add specific validations for each Field, that’s great!
The purpose of this is to render the Field in “error mode”.

But there is something I’m not able to do: make my business validations after the user clicks on the “Save” button and retrieve the corresponding field to call the method setComponentError(…)
Only basic validations can be done (integer only, max value, date time range, …) but for more complex validations (business requirements) I don’t know…

How can I do that?