Get Selected row count in View object in OAF

Scenario: Get the selected rows count to display to user after performing some action

  • Take the view object.
  • Get all the rows of view object
  • Take a loop to process the rows of view object
  • Get the row information
  • Check if the row is selected or not by verifying the row's attribute

 int selectedRowCount = 0;

try{

CustomerSearchVOImpl selectedSerachVO = getCustomerSearchVO1();

Row row[] = selectedSerachVO.getAllRowsInRange();

for(int i=0; i<row.length; i++){

CustomerSearchVORowImpl searchRow = (CustomerSearchVORowImpl)row[i];

if (searchRow.getSelection()!=null && searchRow.getSelection().equals("Y")){

selectedRowCount = selectedRowCount + 1;

}

}

}

*/

No comments:

Post a Comment