5 Replies Latest reply: Sep 26, 2012 1:01 PM by gkieck RSS

    RowSetIterator missing first row

    gkieck
      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