Tuesday, 22 January 2013

Issue when Fetching records from db in OAF

I have a table in my page, in PR i am fetching records from db.
I have one transient column in my table, it is calculated based on 2 column.

Problem is, when data is fetched, i want to fill this transient column but i'm failing. 
I am using myvo.getAllRowsInRange(); which returns 1 row only.
However, when i reload page it return all column.

Code here

public void disp_ass_num()
{
  SplitVOImpl svo = getSplitVO1();

  Row r[] = svo.getAllRowsInRange();
  for(int i=0;i<r.length;i++)
  {
  r[i].setAttribute("DispAssNum",""+r[i].getAttribute("AssetNum")+"-"+r[i].getAttribute("RevNum"));
  }

Please help
 
 
Solution:
 
Please Refer  Below Code
 
 
 public void disp_ass_num()
{
SplitVOImpl svo = getSplitVO1();
for(Row row=svo.first();row!=null;row=svo.next())
{
SplitVORowImpl rowi = (SplitVORowImpl)row;

// Do  get set attribute here
}

}
 
 
 
 

No comments: