Dynamic Attribute Creation
We can use below code to create an attribute dynamically.
public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
super.processRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject vo = (OAViewObject)am.findViewObject("ViewObjectName");
if (vo != null) {
try {
String transientAttr =
vo.findAttributeDef("XXAttr").toString();
} catch (Exception e) {
vo.addDynamicAttribute("XXAttr");
}
}
}
0 Comments