This is the basic requirement when we are working with oracle OAF. In which we need to removed the all rows from the table.
The best use case is when we need to clear the details Table on Clear All button.
Here is the two Approaches .
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();} |
No comments:
Post a Comment