Anil's Blog is Best Viewed on GOOGLE CHROME

Saturday, May 2, 2009

How do I find rows that were selected by the table selector

Application Module Code


import oracle.jbo.RowSetIterator;

public void checkSelectedrow()
{

OAViewObject vo = getTeamRoleListVO1();
int fetchedRowCount = vo.getFetchedRowCount();
RowSetIterator selectIter = vo.createRowSetIterator("selectIter");

if (fetchedRowCount > 0)
{
// Save the original range size and range start.
 selectIter.setRangeStart(0);
 selectIter.setRangeSize(fetchedRowCount);

//Creates a Transient Attribute of "String" type.





for (int i = 0; i < fetchedRowCount; i++)
{
TeamRoleListVORowImpl rowi = (TeamRoleListVORowImpl)selectIter.getRowAtRangeIndex(i);
String selectFlag = rowi.getSelectFlag()+""; 

if("Y".equals(selectFlag )
{
 //  Getting selected row.
}
}
}
 selectIter.closeRowSetIterator(); }

2 comments:

  1. Hi Anil,

    How will the value be set for attribute 'selectFlag'? Is it done automatically?

    -Murugan-

    ReplyDelete

Note: Only a member of this blog may post a comment.