title: FacesContext: separate error and success messages
body: <p>I'm creating error messages this way:</p>
  
  <pre><code>public static void setErrorMessage(String errorMessage) {
    FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(errorMessage));
  }
  </code></pre>
  
  <p>and showing them on the form in case of error (red color):</p>
  
  <pre><code>&lt;h:messages styleClass="error"/&gt;
  </code></pre>
  
  <p>How to separate error and success messages in JSF? Simply, how to show the positive messages in green color and the negativ in red?</p>