title: Reset all fields in form
body: <p>I am trying to reset the form fields after choosing confirm button in a dialog form </p>
  
  <pre><code>&lt;h:form id="form"&gt;  
  &lt;p:panel id="panelform"&gt;
   &lt;h:panelGrid id="formulaire" columns="2"&gt; 
  ...
  &lt;/h:panelGrid&gt;
  &lt;/p:panel&gt;
   &lt;p:dataTable ..... &lt;/p:dataTabe&gt;
  &lt;/h:form&gt;
  &lt;p:confirmDialog style="position: absolute; width: 50px; border-color: blue" id="deleteData"  message="Your Database Will be completely removed. Are you sure? "  
                                       appendToBody="true"                                                               
                                       header="Delete List" severity="alert" widgetVar="deleteDialog"&gt;                          
                          &lt;h:form&gt;     
                              &lt;p:commandButton id="confirm" value="Confirm" actionListener="#{MB.deleteData()}" update=":form" ajax="true" oncomplete="deleteDialog.hide(); purchase.hide();" &gt;                            
                              &lt;/p:commandButton&gt;  
                              &lt;p:commandButton id="cancel" value="Later" onclick="deleteDialog.hide();" type="button" /&gt;                           
                          &lt;/h:form&gt;
                      &lt;/p:confirmDialog&gt; 
  </code></pre>
  
  <p>My deleteData method in my sessionScoped bean is </p>
  
  <pre><code> public String deleteData() {
      logger.log(Level.SEVERE, "*****delete Datas***** ");
      dataBusinessLocal.deletedatas(datas);
      logger.log(Level.SEVERE, "*****delete Data***** ");
      dataBusinessLocal.deleteData(data);
      datas.clear();
      RequestContext.getCurrentInstance().reset("form:panelform");  
      return "datasList";
  }
  </code></pre>