Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

while(vo.hasNext) not going to next pointer for only 1 row

NessSep 6 2017 — edited Sep 7 2017

hi all,

m using jdev version 12.2.1.2.0

on popup,there is a table on which data comes from sql-query based VO.

Now when there is only 1 row in the table control does not go inside while(corpCodeVO.hasNext()).....but when there are more than 1 rows control goes inside while(corpCodeVO.hasNext()) Capture12.PNG

public void selectDeselectAllRowsCorpCode(ValueChangeEvent valueChangeEvent) {

    boolean isSelected=((Boolean)valueChangeEvent.getNewValue()).booleanValue();

    DCBindingContainer bindings =(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();

    DCIteratorBinding corpCodeIter = bindings.findIteratorBinding("dispatchCorpCodeDetailsNewVO1Iterator");

    ViewObject corpCodeVO=corpCodeIter.getViewObject();

    int i=0;

    Row row =null;

    corpCodeVO.reset();

 /\*   RowSetIterator rs=corpCodeVO.createRowSetIterator(null);

    rs.reset();\*/

   while(corpCodeVO.hasNext()) {

        if (i == 0)

        row = corpCodeVO.first();

        else

        row = corpCodeVO.next();

        if (isSelected) {

           row.setAttribute("SelectRowChk", Boolean.TRUE);

         }

        else

        {

            row.setAttribute("SelectRowChk", Boolean.FALSE);

            }

        i++;

    }

}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 5 2017
Added on Sep 6 2017
4 comments
497 views