What would the method facesContext.isValidationFailed() return after the Render Response Phase when the validation fails? It returns false for me in this case.
It will only return true when FacesContext#validationFailed() has been called by the JSF validation internals or by your own code as follows:
FacesContext.getCurrentInstance().validationFailed();
As far JSF internal code is concerned, only UIInput#processValidators() and UIViewParameter#processValidators() will implicitly call this method whenever a ValidatorException has been caught.
If it returns false for you, then you're apparently doing validation in a non-standard way. For example inside the action method, while you should be using a real Validator for this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With