title: Primefaces reset messages in p:dialog
body: <p>I am opening a popup on click of command link, and popup has a textbox and commandLink
  whenever I press submit with textbox left blank, it shows validation msg, till now this is fine. Now if I close the popup  using cross icon on top right. then again click to showPopup, it show the error messages . I want to clear that messages and open fresh popup.
  below is my code</p>
  
  <pre><code>&lt;p:commandLink id="showDialogButton" styleClass="add_icon"
                                               value="ADD" onstart="#{dashboardBean.resetFoodPromoDTO()}" oncomplete="PF('dlg').show()" /&gt;
  </code></pre>
  
  <p>bean</p>
  
  <pre><code> public void resetFoodPromoDTO(){
      foodPromoDTO=null;
          }
  </code></pre>
  
  <p>popup dialog</p>
  
  <pre><code>&lt;p:dialog id="dialog" visible="#{not empty facesContext.messageList}" styleClass="customized" widgetVar="dlg" draggable="true" closable="true" resizable="false" width="730"&gt;
  &lt;div class="popup_subheader"&gt;
  &lt;div class="float_left"&gt;Add - Food Promotion Activity&lt;/div&gt;
  &lt;div class="float_right"&gt;&lt;/div&gt;
  &lt;div class="clear"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="popuptext"&gt;
              &lt;div class="form-label"&gt;&lt;label title="Project"&gt;Project:    &lt;/label&gt;&lt;/div&gt;
              &lt;div class="form-field"&gt;&lt;p:inputText  id="projectName" value="#{dashboardBean.foodPromoDTO.project}" required="true" requiredMessage="#{msg['validation.project.name']}"/&gt;
              &lt;p:message id="projeMsgId" for="projectName" autoUpdate="true"/&gt;
              &lt;/div&gt;
              &lt;div class="clear"&gt;&amp;nbsp;&lt;/div&gt;
  
              &lt;div class="form-label"&gt;&lt;label title="Promo Date"&gt;Promo Date:&lt;/label&gt;&lt;/div&gt;
  
              &lt;div class="btn_area_popup"&gt;
              &lt;span&gt;
              &lt;p:commandLink id="submitButton" validateClient="true" value="Save" action="#{dashboardBean.addFoodPromotion()}" update="@form" onuccess="PF('dlg').hide();" ajax="true"/&gt;
              &lt;/span&gt;
              &lt;/div&gt; 
              &lt;div class="clear"&gt;&lt;/div&gt;   
  </code></pre>
  
  <p>
  </p>