You have to just put you code in the controller against the View object for which you want to know its complete details.
With the help of System.out.println() & PageContext.writeDiagnostics() function you can print every thing about the view object in the oaf page and you will get a good understanding of the object and you can do extension in right way.
OAApplicationModule am = pageContext.getApplicationModule(webBean);
ViewObject vo = am.findViewObject("SupplierVO");
if (vo!=null) {
vo.executeQuery();
while (vo.hasNext()) {
Row row = vo.next();
String rowDataStr = "";
// To Check How many attributes (columns) is the View Object using?
int numAttrs = vo.getAttributeCount();
// Column /Attributes numbers start with 0, not 1.
for (int columnNo = 0; columnNo < numAttrs; columnNo++) {
// See also Row.getAttribute(String name).
Object attrData = row.getAttribute(columnNo);
rowDataStr += (attrData + "\t");
}
pageContext.writeDiagnostics(this,rowDataStr,2);
System.out.println( "Data of View Object SupplierVO:"+rowDataStr);
}
}
0 comments:
Post a Comment