Programmatically getting results back from an Iterator for ADF or BPM Arrays

Took me a while to get this stuff working the way I wanted it to but here are some code snippets of what I did to make it work properly.

//Iterate Objects
DCBindingContainer iteratorBindings =
(DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding myIterator= iteratorBindings.findIteratorBinding(“iteratorName”);

RowSetIterator rsi = myIterator.getRowSetIterator();

if (rsi.getRowCount() == 1) {
Row oneRow = rsi.getCurrentRow();
String controlTestID = row.getAttribute(“myAttribute”).toString();
}

if (rsi.getRowCount() > 1) {
Row cycledRow = rsi.getCurrentRow();
String controlTestID = row.getAttribute(“myAttribute”).toString();

while (rsi.hasNext()) {
cycledRow = rsi.next();
String controlTestID = row.getAttribute(“myAttribute”).toString();}
}

rsi.closeRowSetIterator();

Leave a comment