Thursday, May 16, 2013

Delete Multiple rows from a Table


Step 1. Add one transient attribute "SelectFlag" of type string to your VO
Step 2. create multiple selection based on this attribute
Step 3. In table actions add one button called "Delete"

To handle delete functionality write following code:
public void deleteRow()
{
    XXEGASRLinesVOImpl pervo = getXXEGASRLinesVO1();
    Row row[] = pervo.getAllRowsInRange();
   for (int i=0;i   {
     XXEGASRLinesVORowImpl rowi = (XXEGASRLinesVORowImpl)row;
    if (rowi.getSelectFLag()!= null && rowi.getSelectFLag().equals("Y"))
    {
       rowi.remove();
    }
  }
}
Related Posts Plugin for WordPress, Blogger...