Showing posts with label Clear the filters. Show all posts
Showing posts with label Clear the filters. Show all posts

Friday, 22 June 2018

Clear the table filters programmatically


This blog we will see how to clear the table filters programmatically.

The below code we need to add to clear the table filter
jspx/jsff:
 Bean:

    public void resetFilter(ActionEvent actionEvent) {
        FilterableQueryDescriptor fqd = (FilterableQueryDescriptor)t1.getFilterModel();
               if (fqd != null && fqd.getFilterCriteria() != null) {
                 fqd.getFilterCriteria().clear();
                 t1.queueEvent(new QueryEvent(t1, fqd));          
              }
    }

  Thanks..