This discussion is archived
5 Replies Latest reply: Sep 26, 2012 11:01 AM by gkieck RSS

RowSetIterator missing first row

gkieck Newbie
Currently Being Moderated
Good evening ADF friends,

i have a problem with the following code.
JDEV version 11.1.2.2.0

public void doSomething(ActionEvent actionEvent) {
BindingContext bctx = BindingContext.getCurrent();
BindingContainer bcon = bctx.getCurrentBindingsEntry();
DCBindingContainer dcbcon = (DCBindingContainer)bcon;
DCIteratorBinding dciter = dcbcon.findIteratorBinding("EmployeesView1Iterator");
RowSetIterator rsiter = dciter.getRowSetIterator();
System.out.println("COUNT: " + rsiter.getRowCount());
int i = 0;
rsiter.reset();
while (rsiter.hasNext()) {
Row row = rsiter.next();
System.out.println(++i + ": " + row.getAttribute("LastName"));
}
rsiter.closeRowSetIterator();
}

Shortened SOP output:

COUNT: 107
1: Kochhar
2: De Haan
.
.
-
106: Gietz

The RowSetIterator swallows the first row Mr.King. Is there a workaround to solve this problem?
The sop COUNT shows 107 rows, but LASTNAME has only 106 entries.

Thank you for your help.

Best regards
Gunnar

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points