Here’s how I show a notice on a JSF 2 page indicating that the JSF 2 postback failed due to validation errors. The following facelet snippet is rendered only when validation fails:
<h:outputtext
styleclass="errorMessage globalMessage"
value="Request *not* saved due to input errors"
rendered="\#{facesContext.validationFailed}" />
The user then knows they should look through the page to correct the individually marked validation failures.
Share this post
Twitter
Google+
Facebook
Reddit
LinkedIn
StumbleUpon
Pinterest
Email