Thursday, March 15, 2012

How to get selected rows from View object in an Application Module based on specific value on an attribute

I have noticed many times while developing ADF applications, Most of us having a common requirement for instance - How to get selected rows from View object in an Application Module based on specific value on an attribute ?

The view object might be having 50K rows displayed on screen out of it user could have selected less number of rows. Instead of iterating all the rows to determine 2 selected rows out of it, We can always use getFilteredRows() method on VO and get the array of selected rows.

Row[] selRowArr = vo.getFilteredRows("RowChkFlg", Boolean.TRUE);

In this example, RowChkFlg is one of the boolean attribute dragged onto the screen and allows to select row.

No comments:

Post a Comment