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..
Hi,
ReplyDeleteHow to reset data and filters both on same button click action?
Thanks,
Vishal Kumar
This Approach is usable with out clicking any button
ReplyDeleteStep1: Create one Variable like Private String clearFilter.
Step2: Create setters and getters for that variable.
Step3: write the above code in getter method.
Step4: user that getter method as a value for output text and make that output text visible="false".