title: <p:datatable/> not refreshing after deleting
body: <p>I am using <strong>JSF</strong> and <strong>Primefaces</strong> in my web application.</p>
  
  <p>I am using <strong>p:datatable id="jobEditTable"</strong> component of primefaces.</p>
  
  <p>In this i have option of deleting some rows.</p>
  
  <p>In datatable i have one delete button on clicking of that button i am showing a 
  <strong>p:dialog id="deleteJob"</strong> 
  Then i fill some resaon for deleting in <strong>p:dialog</strong> then i am clicking on one command link in <strong>p:dialog</strong> then it calls one action listener where i am clearing the <strong>list of data and creating again.</strong></p>
  
  <p>And onClick of that command link i am updating jobEditTable and hiding that p:dialog.</p>
  
  <pre><code>    &lt;p:datatable id="jobEditTable" value="#{mastersBean.dataList}"..../&gt;
   . . .. . . .  . . .
      &lt;p:commandLink  actionListener="#{tableBean.deleteRow}" update="jobEditTable"  oncomplete="deleteJob.hide()"&gt;
                 &lt;p:graphicImage value="/images/delete_button.png" /&gt;
                   &lt;f:attribute name="model" value="#{tableBean.delCode}"&gt;&lt;/f:attribute&gt;
                  &lt;/p:commandLink&gt;
  </code></pre>
  
  <p>All is working fine datatable is also refreshing.</p>
  
  <p><strong>BUT</strong>  if we search for some jobs before deleting and doing that process than data table is not refreshing. <strong>WHY??</strong></p>
  
  <p>Means, data table is refreshing if i am not using any filter means without search if i delete some row then data table is refreshing but after searching and on deleting data table is not refreshing..</p>
  
  <p><strong>Why it is behaving like this ??</strong></p>
  
  <p>My bean in <strong>view scope</strong>.</p>
  
  <p>This is my <strong>ManagedBean named MastersBean</strong></p>
  
  <pre><code>  public void deleteDetails(ActionEvent e)
      {
          String id=(String)e.getComponent().getAttributes().get("param");
          ........deleting data from database according to id.........
              dataList.clear();
  
        ..........updating datalist again....................
          FacesContext context = FacesContext.getCurrentInstance();  
  
          context.addMessage(null, new FacesMessage("Successfully Deleted"));  
  
      }
  </code></pre>