title: Perform action when jsf validation errors occur
body: <p>Is it possible to perform some actions (some cleanup) if jsf validation errors occur?<br>
  Fields are validated with tags in xhtml, for example 'required="true"', 'f:validateRegex pattern="\d*"', 'f:validator validatorId="someValidator"'.<br>
  I need to set some property field of managed bean to null (when there are any failures on the page).
  But if validation fails, then JSF goes to Render Response Phase and managed bean method is not invoked.
  Listener (using f:actionListener tag) also is not invoked in that case.<br><br>
  Now I'm thinking about to replace xhtml validation by validation using bean annotations like @AssertTrue, @Size, etc.
  Then in some of this validating methods it would be possible to make a cleanup:</p>
  
  <pre><code>@ManagedBean
  class SomeBean {
  ...
      @AssertTrue
      public void isClenup() {
          cleanup();
      }
  ...
  }
  </code></pre>
  
  <p>But it seems not a good solution to me. <br>Also I noticed that several methods annotated with @AssertTrue are called in undefined order. Therefore switching from xhtml validation to bean annotations validation is getting not so easy.<br>
  Is it possible to define some order of calling methods annotated with @AssertTrue?</p>