Monthly Archives: October 2012

How To in Jdeveloper ADF – To call a VO from another VO or from AM method


Scenario:
How to set an Attribute value from one VO into another VO?

Solution: 

//in you Application module Impl file have the follwing code written inside the method which will set the value for another vo
//lets say UploadView is the View object that you would want to set the value
ViewObject vo = findViewObject("tUploadView");
//if its not in Application Module, you will have to get the VO instance either from iterator if you are using this code in the bean
//get the rowset of UploadView
RowSet rs = vo.getRowSet();
//iterate through
while(rs.hasNext()){
//get the row
Row r = rs.next();
//set the value
r.setAttribute("ValueItem", value); //ValueItem is the Attribute that you want to set
}
}