Thursday, December 22, 2011

Adding transient attribute to standard VO

OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject vo=(OAViewObject)am.findViewObject("ListVO");
if(!vo.isPreparedForExecution()){
vo.executeQuery();
}

if(cvo!=null){
try{
String transientAttr=cvo.findAttributeDef("XXAttr").toString();
}catch(Exception e){
vo.addDynamicAttribute("XXAttr");
}

Debugging Techiques in OAF

Posting soon....

OAF Interview Question

Posting soon

Migrating Personalization from one instance to another

Posting soon...

OAF - Making mandatory Attachement Mandatory

Case - Need to make the Attachment Bean mandatory. Use the below line of code in PFR.

OAMessageAttachmentLinkBean oamessageattachmentlinkbean = (OAMessageAttachmentLinkBean)oawebbean.findChildRecursive("");

String attachVal = (String)oamessageattachmentlinkbean.getAttributeValue(oapagecontext.getRenderingContext(),TEXT_ATTR);

if("None".equals(attachVal))
{
throw new OAException(“Attachment mandatory”,OAException.ERROR);
}