title: How to display dialog only on complete of a successful form submit
body: <p>I have a form with 2 required input fields and a command button which shows a dialog:</p>
  
  <pre><code>&lt;p:commandButton id="showDialogButton" value="Enregistrer" 
      action="#{DEQbean.Ajouter()}" update="@form"
      oncomplete="dialogaboutDEQ.show()" /&gt;
  
  &lt;p:dialog id="reamrquesDEQ" widgetVar="dialogaboutDEQ" header="Informations"
      width="400" closable="false" resizable="false" showEffect="clip"
      hideEffect="clip" modal="true" appendToBody="true"&gt;
  
      &lt;p:messages id="messages" showDetail="true" autoUpdate="true"/&gt;
      &lt;p:commandButton value="OK" action="DEQlist" /&gt;    
  &lt;/p:dialog&gt;  
  </code></pre>
  
  <p>I would like to show the dialog only when the validation has passed and the action method is executed. However, when the required input fields are empty and the action method is thus not executed, the dialog is still shown. </p>
  
  <p>How do I display the dialog only on complete of a successful form submit?</p>