title: Update button in datatable after event
body: <p>i have a simple example for my problem. I have a datatable and i want to disable the button in the footer on a sort, filter or page event. I update the button in the footer, but nothing changes. The other button, in the other form, works fine. If i update the whole table form with "@form", the table would be destroyed. </p>
  
  <p>I found a solution with Primefaces Extensions pe:RemoteCommand (<a href="http://fractalsoft.net/primeext-showcase-mojarra/sections/remoteCommand/basicUsage.jsf" rel="nofollow">http://fractalsoft.net/primeext-showcase-mojarra/sections/remoteCommand/basicUsage.jsf</a>) ... if i use the onComplete- Methode of the Event and call the remoteCommand than i can update the button in the footer from there. </p>
  
  <p>Can someone explain me that? 
  Thank you for your time.  </p>
  
  <p>XHTML:</p>
  
  <pre><code>   &lt;html lang="en" xmlns="http://www.w3.org/1999/xhtml"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:p="http://primefaces.org/ui"&gt;
  &lt;h:head&gt;&lt;/h:head&gt;
  &lt;h:body&gt;
  &lt;h:form id="tableform"&gt;
      &lt;p:dataTable value="#{bean.personList}" var="person" paginator="true"
          rows="5" rowKey="#{person.id}"&gt;
          &lt;p:ajax event="page" listener="#{bean.onPaging}"
              update=":outform:buttonOut buttonIn" /&gt;
          &lt;p:ajax event="filter" listener="#{bean.onFilter}"
              update=":outform:buttonOut buttonIn" /&gt;
          &lt;p:ajax event="sort" listener="#{bean.onSort}"
              update=":outform:buttonOut buttonIn" /&gt;
  
          &lt;p:column headerText="id" sortBy="#{person.id}"
              filterBy="#{person.id}"&gt;
      #{person.id}        
      &lt;/p:column&gt;
  
          &lt;p:column headerText="name" sortBy="#{person.name}"
              filterBy="#{person.name}"&gt;
      #{person.name}
      &lt;/p:column&gt;
  
          &lt;f:facet name="footer"&gt;
  
              &lt;p:commandButton id="buttonIn" value="ButtonIn"
                  disabled="#{!bean.visible}" /&gt;
          &lt;/f:facet&gt;
      &lt;/p:dataTable&gt;
  &lt;/h:form&gt;
  
  &lt;h:form id="outform"&gt;
      &lt;p:commandButton id="buttonOut" value="ButtonOut" disabled="#{!bean.visible}" /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>Bean:</p>
  
  <pre><code>@ManagedBean
  @ViewScoped
   public class Bean {
  
  private List&lt;Person&gt; personList;
  
  
  
  private boolean visible = true;
  
  @PostConstruct
  public void init(){
      personList = new ArrayList&lt;Person&gt;();
      for(int i = 0 ; i &lt; 100 ; i++){
          personList.add(new Person(i, "Person" +i));
      }
  }
  
  public void onPaging(PageEvent event){
      visible = false;
  }
  
  public void onSort(SortEvent event){
      visible = false;
  }
  
  public void onFilter(FilterEvent event){
      visible = false;
  }
  
  
  public boolean isVisible() {
      return visible;
  }
  
  public void setVisible(boolean visible) {
      this.visible = visible;
  }
  
  public List&lt;Person&gt; getPersonList() {
      return personList;
  }
  
  public void setPersonList(List&lt;Person&gt; personList) {
      this.personList = personList;
  }
  </code></pre>
  
  <p>}</p>