Saturday, 19 September 2009

Detecting Errors From Request Processing in JSF Pages

Recently I came across a little problem — display a portion of JSF only if the request was successful, i.e. no validation errors and if the request has actually been sent to the server (no request, no errors). Here is what I did:
<h:outputText
  rendered="#{empty facesContext.maximumSeverity && !empty Enquirer.name}"
  value="Thank you. You message has been sent."/>
The source that pointed me in the right direction.

No comments:

Post a Comment