ADF, JDeveloper

How to iterate through all view object rows irrespective of specified range size and without impact to current rowset?

Problem

Imagine we have iterator binding EmployeesViewIterator with specified range size 25. But we want to iterate through ALL employees available, not just 25 of current range.

Solution

Create new row set iterator from EmployeesView view object. It will contain ALL rows irrespective of specified range size. Iterate it !

DCIteratorBinding it = (DCIteratorBinding)BindingContext.getCurrent().getCurrentBindingsEntry().get("EmployeesViewIterator");

RowSetIterator rsi = it.getViewObject().createRowSetIterator(null);
while (rsi.hasNext()) {
Row row = rsi.next());
//...
}
rsi.closeRowSetIterator();