Thursday, August 25, 2016

How To: Remove all rows from view object (VO) in OAF & ADF

Option 1: 

The executeEmptyRowSet() method can be used to empty the VO. This is my preferred approach.
    /* Use the following snippet in the Application Module (AM) */
    OAViewObjectImpl vo = this.getMyDummyVO();
    vo.executeEmptyRowSet();

Option 2: 

Loop through the VO and remove each row. If the data set is too large this could be cost intensive. I do not prefer this option.
    /* Use the following snippet in the Application Module (AM) */
   OAViewObjectImpl vo = this.getMyDummyVO();
   while(vo.hasNext()){
      vo.next().remove();
   }

Please share your feedback below. Hope you find this helpful!


CaptiveCode


No comments:

Post a Comment