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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s