title: How to update other component AFTER filtering lazy dataTable in primefaces
body: <p>is there any possibility to update other components AFTER filtering a lazy datatable?</p>
  
  <pre><code>&lt;p:dataTable id="dataTable" value="#{NewsBean.items}" binding="#{NewsBean.items.dataTable}" lazy="true" filteredValue="#{NewsBean.filter}" var="item" paginator="true" rows="10"
              currentPageReportTemplate="(Displaying results {startRecord} - {endRecord} of {totalRecords})"
              paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
              rowsPerPageTemplate="10,20,50,100,200,500,1000" filterEvent="enter"&gt;
  
              ...
  
              &lt;p:ajax event="filter" update="some_other_component" /&gt;
  
              ...
  
  &lt;/p:dataTable&gt;
  &lt;p:blockUI block="dataTable" trigger="dataTable" /&gt;
  </code></pre>
  
  <p>The specific problem is, that the filter event fires before my dataTable completes the lazy filtering and so the update event for the other component will be fired to early. So the component is not able to show filter specific content. Filtering again will show the result of one step before.</p>
  
  <p>I found a solution by BalusC to use remote Command instead.</p>
  
  <pre><code>&lt;p:ajax event="filter" oncomplete="updateFilterSelection()" /&gt;
  &lt;p:remoteCommand name="updateFilterSelection" update="some_other_component" /&gt;
  </code></pre>
  
  <p>But using this solution will end in an endless loading of my blockUI. Seems that oncomplete event isn't fired anymore.</p>
  
  <p>Is there any solution?</p>
  
  <p>I'm using primefaces 3.5.</p>
  
  <p>Thanks</p>
  
  <p>EDIT: I found a solution for me that works as expected:</p>
  
  <pre><code>&lt;p:ajax event="filter" listener="#{some_Method}" update="some_other_component" /&gt;
  </code></pre>
  
  <p>some_Method does call a refresh, e.g a redirection on the current view. But I'm sure, that this creates a lot of overhead.</p>