title: How to clear global filter in PrimeFaces DataTable
body: <p>How can I clear global filter in PrimeFaces DataTable using "Clear" CommandButton? I found <a href="http://forum.primefaces.org/viewtopic.php?f=3&amp;t=24230" rel="nofollow">similar question on PrimeFaces forum</a>, but looks like not answered - the tip one can find there didn't help me. I tried to solve the problem as follows:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;p:dataTable id="myTab" widgetVar="myTabWidgetVar" var="obj"
      value="#{managedBean.objects}"&gt;
      &lt;f:facet name="header"&gt;
          &lt;p:outputPanel&gt;
              &lt;h:outputText value="Search all fields:"/&gt;
              &lt;p:inputText id="globalFilter" onkeyup="myTabWidgetVar.filter()"/&gt;
          &lt;/p:outputPanel&gt;
      &lt;/f:facet&gt;
  &lt;/p:dataTable&gt;
  &lt;p:commandButton value="Clear" onclick="myTabWidgetVar.clearFilters();"
      update="@form"/&gt;
  </code></pre>
  
  <p>It clears column filters only. Value in global filter remains uncleared. Can you help me to solve the problem?</p>