Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to clear filter criteria for a table on page entry

user7361268Dec 6 2012 — edited Dec 7 2012
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)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2013
Added on Dec 6 2012
3 comments
336 views