Sunday, July 1, 2018

Reading Dynamically Added Attributes from a View Object

Reading Dynamically Added Attributes from a View Object


You can use the the PDefViewObject::getAttributeDefs2() to read the dynamically added attributes (attributes added by calling ViewObject::addDynamicAttribute or using PDefViewObject )  from  a view object. The relevant code snippet is shown here:

PDefViewObject pDef = (PDefViewObject)((ViewDefImpl) 
getDepartmentsVO().getDef()).getPersDef();
if (pDef != null) {
AttributeDef[] attributes = pDef.getAttributeDefs2();
for (AttributeDef acttrib : attributes) {
System.out.println(acttrib.getName());
}
}


visit link download