Total Pageviews

Wednesday, June 1, 2011

Loop Through Fetched Records in VO

This particular example was written for Oracle Sourcing.
It is very useful because you are able to get all records fetched from OAF, identify the ones you want
and do some work on them, by writing e.g. a pl/sql block.

       OAApplicationModule rootAM = pageContext.getRootApplicationModule();           
       OAViewObject ReqVO   =      (OAViewObject)rootAM.findViewObject("BidHeaderSectionsVO");
           
            if (null!=ReqVO) {
                Row ReqRow = ReqVO.first();           
                if (null != ReqRow) {
                           
                int idx = ReqVO.getRowCount();
   
                for (int xx = 0; xx < idx; xx++) {
                    if (null != ReqRow) {
                       // Do some work....
                       ReqRow = ReqVO.next();
                    }
                    else {}
                }
              }
            }

No comments:

Post a Comment