When re-entering a page, I'd like to clear the filter values (on each column) for an af:table called listTable so that there is no filter criteria and the data in the table is bringing all rows. I tried to use the following code on the setListTable method in a ViewScope bean associated with the page:
FilterableQueryDescriptor queryDescriptor =(FilterableQueryDescriptor) getListTable().getFilterModel();
if (queryDescriptor != null && queryDescriptor.getFilterCriteria() != null){
queryDescriptor.getFilterCriteria().clear();
getListTable().setFilterModel(queryDescriptor);
getListTable().queueEvent(new QueryEvent(getListTable(), queryDescriptor));
AdfFacesContext.getCurrentInstance().addPartialTarget(getListTable());
}
but am getting the following output in the console (no exceptions):
<PropertyKey> <saveValue> Unserializable value:oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$QueryDescriptorImpl@c1f370 for key:UINodePropertyKey[filterModel,26]
and it appears that the underlying iterator for that table gets messed up and only stays on the first row.
So all of that said, what is the proper way to reset a table's FilterModel or how would one clear the column's filter criteria?
Jdeveloper 11.1.2.3.0 (IDE: 11.1.2.3.39.62.76.1)