I write solutions to the problems I can't find much about elsewhere on the Web, also some code/script snippets that are absolutely awesome and make my life easier. Will be glad if someone finds these posts interesting and helpful!

Monday, May 3, 2010

Clear an iterator in ADF 10g

The mission is to empty out an iterator without setting its Refresh attribute to “never” and consequentially executing it manually. What I ended up doing, when I needed this once, was adding a parameter to the query WHERE clause (something like “and 1 = nvl(:param, 1)”) and invoking it with a zero when I needed it empty. Apparently there is an easier way.
Say the iterator to clear is defined in the pageDef as:

Then the code in the backing bean would look like:

That’s it. Hope this helps!

No comments:

Post a Comment