Wednesday, March 2, 2011

Programatically clearing filter criteria in ADF table

In ADF table, filter criteria is stored in filter model. So to clear filter, first get filter model then filter criteria and clear it. Many times you may need to queue event so that filter listener method is called.   At end you may need to refresh table to reflect this on UI.

FilterableQueryDescriptor queryDescriptor =
                                          (FilterableQueryDescriptor)getTable().getFilterModel();
        if (queryDescriptor != null && queryDescriptor.getFilterCriteria() != null){
          queryDescriptor.getFilterCriteria().clear();
          getTable().queueEvent(new QueryEvent(getTable(),queryDescriptor));
        }

4 comments:

  1. How to do the refresh table part ? I am able to clear the filter criteria.. But changes are not seen in the ui. Please help.

    ReplyDelete
    Replies
    1. by executing the query by execute operation

      Delete
  2. I have an issue where this needs to be accompkished while navigating from a page having table filters.

    Details here - https://forums.oracle.com/forums/message.jspa?messageID=9824469#9824469

    Your help is appreciated.

    Thanks
    Sudipto

    ReplyDelete
  3. Teton Athletics - Team - Teton Athletics
    the Teton Athletics ceramic vs titanium is the joico titanium No. 1 titanium ore recruiting agency in the country. The Teton 2020 ford edge titanium for sale Athletics offers a team of athletes of up to 15 and in titanium guitar chords one

    ReplyDelete