There has been a Requirement given that there is a split icon present against each row in an Advance Table.
As the user clicks on Split Icon...the parent row should get split into two and the new Row should be inserted right below the parent row.
As an OAF Standard New Row gets inserted at the top of the View Rows.
But we can insert it right below the parent row.
Invoke a method in AM as the User press Split Icon and pass the Id of the row to be splitted.
and loop through the VO rows and identify the row to be splitted.
Then set the current row and insert the new row.
for(xxinvoiceVORowImpl row = (xxinvoiceVORowImpl)vo1.first();
row != null;
row = (xxinvoiceVORowImpl)vo1.next())
{
if(row.getAttribute("InvoiceId")!=null)
{
String invoice = (String)row.getAttribute("InvoiceId").toString();
if(inv.equals(invoice))
{
vo1.setCurrentRow(row);
vo1.next();
xxinvoiceVORowImpl newrow = (xxinvoiceVORowImpl)vo1.createRow();
vo1.insertRow(newrow);
break;
}
}
}
This will insert the row right below the Row on which Split icon was clicked.
Thanks,
Gaurav