title: PrimeFaces with JSF - "onerror " in the <p:commandButton> doesn't work
body: <p>I am using JSF,with <a href="https://docs.oracle.com/javaee/7/api/javax/faces/bean/ManagedBean.html" rel="nofollow noreferrer"><code>@ManagedBean</code></a> annotation and using Primefaces, and I got the following problem.</p>
  
  <p>Why the "<code>onerror</code>" is not triggered?  The exception just appears in my console.</p>
  
  <p><strong>login.xhtml</strong>  </p>
  
  <pre><code>&lt;p:commandButton 
       value="teste" 
       action="#{loginBean.methodTest()}" 
       ajax="true" 
       immediate="false" 
       onerror="confirmation.show()" /&gt;
  
  &lt;p:dialog  
      appendToBody="true" 
      header="Atencao" 
      widgetVar="confirmation"  
      showEffect="bounce"&gt;  
       ...  
  &lt;/p:dialog&gt;  
  </code></pre>
  
  <p><strong>MyBean</strong></p>
  
  <pre><code>@ManagedBean(name = "loginBean") 
  @SessionScoped  
  public class LoginBean {
  
      public void methodTest() throws Exception {
          System.out.println("hi");       
          throw new Exception("Exception Test");           
      }
  </code></pre>