0
<f:event type="postValidate" listener="#{bean.action}" />

Does the postValidate occur during the validation phase? I tried to use it to do additional validation, but when it failed, the update models phase was still processed. I thought if validation fails it would skip update models.

clarinet
  • 113
  • 1
  • 9
  • How do you 'fail' the validation. Please post code in [mcve] format. In the examples I see is that the renderResponse is explicitly called in a postValidate eventhandler if something fails – Kukeltje Aug 03 '16 at 23:13
  • Thanks @Kukeltje. Please see http://stackoverflow.com/questions/38777886/validating-required-on-composite-component-with-multiple-inputs – clarinet Aug 04 '16 at 21:45

1 Answers1

0

It occurs in end of validations phase. JSF will only bypass the remaining phases when you explicitly call FacesContext#validationFailed().

public void postValidate(ComponentSystemEvent event) {
    // ...

    FacesContext.getCurrentInstance().validationFailed();
}

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • Thanks @BalusC, I tried that but it did not work. I'm reposting this in more detail http://stackoverflow.com/questions/38777886/validating-required-on-composite-component-with-multiple-inputs – clarinet Aug 04 '16 at 21:44