title: p:dataTable - refresh datatable after delete row
body: <p>following is my data table pic and i want when i delete a row, data table refreshes. but row deleted from DB but doesnot delete from data table after that.
  <img src="https://i.stack.imgur.com/bE8Xs.jpg" alt="enter image description here">
  i try following codes but they could not help me.</p>
  
  <pre><code>&lt;h2&gt;مشاهده اطلاعات پرسنل&lt;/h2&gt;   
   &lt;h:form id="f2" prependId="false"&gt;  
  
      &lt;p:dataTable id="pdataTable" var="personel" value="#{personelMB.personelList}" rowKey="#{personelMB.personel_id}"
      &gt;  
  
          &lt;f:facet name="header"&gt;  
              اطلاعات پرسنل 
          &lt;/f:facet&gt;  
  
          &lt;p:column&gt;  
              &lt;f:facet name="header"&gt;  
                 شماره پرسنلی  
              &lt;/f:facet&gt;  
  
              &lt;h:outputText value="#{personel.personel_id}" /&gt;  
  
              &lt;f:facet name="footer"&gt;  
                  کدملی 
              &lt;/f:facet&gt;  
          &lt;/p:column&gt;  
  
          &lt;p:column headerText="نام"&gt;  
              &lt;h:outputText value="#{personel.pname}" /&gt;  
          &lt;/p:column&gt;  
  
          &lt;p:column headerText="نام خانوادگی"&gt;  
              &lt;h:outputText value="#{personel.pfamily}" /&gt;  
          &lt;/p:column&gt;  
  
          &lt;p:column headerText="آدرس"&gt;  
              &lt;h:outputText value="#{personel.paddress}" /&gt;  
          &lt;/p:column&gt;  
     &lt;p:column headerText="تلفن"&gt;  
              &lt;h:outputText value="#{personel.pphone}" /&gt;  
          &lt;/p:column&gt;
          &lt;p:column&gt;
        &lt;f:facet name="حذف"&gt;
           &lt;h:outputText value="" /&gt;
        &lt;/f:facet&gt;
        &lt;p:commandButton icon="ui-icon-close" title="حذف"
                         actionListener="#{personelMB.deletePersonel(personel.personel_id)}" update="pdataTable"/&gt;
     &lt;/p:column&gt;
          &lt;f:facet name="footer"&gt;  
              تعداد رکورد#{fn:length(personelMB.getPersonelList())} میباشد.  
          &lt;/f:facet&gt;  
  
      &lt;/p:dataTable&gt;  
  
  &lt;/h:form&gt; 
  </code></pre>
  
  <p>2.second try:</p>
  
  <pre><code>&lt;p:commandButton icon="ui-icon-close" title="حذف"
   actionListener="#{personelMB.deletePersonel(personel.personel_id)}" reRender="pdataTable"/&gt;
                     &lt;/p:column&gt;
  </code></pre>
  
  <p>3.third try:
  personelBean.java</p>
  
  <pre><code>public void deletePersonel(int personel_id){
          Personel personel=(Personel)personelservice.getPersonelId(personel_id);
          getPersonelservice().deletePersonel(personel);
      }
      public String deleteAction(Personel personel) {
          personelList.remove(personel);
          return null;
        }
  </code></pre>
  
  <p>xhtml file</p>
  
  <pre><code>&lt;p:commandButton icon="ui-icon-close" title="حذف"
                         actionListener="#{personelMB.deletePersonel(personel.personel_id)}" action="#{personelMB.deleteAction(personel)}"/&gt;
     &lt;/p:column&gt;
  </code></pre>
  
  <p>please help me.</p>