title: Strategy for cross field validation in Vaadin
body: <p><a href="https://vaadin.com/book/-/page/components.fields.html" rel="nofollow">Field validation</a> works easy enough in Vaadin, but you can't use it to check for relations between fields (e.g. that a joining date must be before a leaving date), which is really annoying. So I added standard class level validation using <a href="https://jcp.org/en/jsr/detail?id=303" rel="nofollow">JSR 303</a> which can do this. This works fine.</p>
  
  <p>But I can perform this cross field validation only after I have commited the fields. That means that the bean already contains all field changes, and in case of a validation issue I need a possibility to "go back" to the valid state before the field commits (or to force somehow a "reload" of the bean), else I'm stuck with the changes, e.g. if the user decides to cancel the edit action.</p>
  
  <p>Of course I could save all field contents before, and reset the state manually, but given that Vaadin does exactly the same in case of simple field validation I'd like to reuse that mechanism. But looking at the Vaadin code, I'm not very confident I can figure out what to do, and to do it right.</p>
  
  <p>Please give me some hints how to deal with this problem without reinventing the wheel. </p>