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!

Clearing ViewCriteria after executing a search

487442Feb 22 2006 — edited Jun 12 2006
Hello,

I got a little problem with view criteria. I made a little demo using ADF and ADF Faces including, among other things, a search page and a list page using HR8 schema.

The search page show the search result on the same page as the form. To achieve it I use two iterator, one for search always in find mode and one for result. That page works perfectly well on its own. The problem is when I switch to the list page after a search. Then the view criteria from the last search is still active. The way I tried to fix that was to add a method action binding to the list page and an invokeAction executable calling it. I tried three different things in the method called, but all failed:

1)
applyViewCriteria(null);
// Changes nothing

2)
ViewCriteria criteria = getViewCriteria();
criteria.clear();
applyViewCriteria(criteria);
// Changes nothing and result in an exception when going back to search page

3)
ViewCriteria criteria = getViewCriteria();
criteria.removeAllElements();
applyViewCriteria(criteria);
// Changes nothing

4)
ViewCriteria criteria = createViewCriteria();
applyViewCriteria(criteria);
// Changes nothing

What is the good way to make sure that when the user go to the list page no more view criteria is active on the ViewObject and thus all rows are accessible ?


Regards,


Simon Lessard
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 10 2006
Added on Feb 22 2006
14 comments
1,102 views