Tuesday, 22 April 2014

Making Attachement Mandatory

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);

4 comments:

  1. Thanks Anna. This was very helpful :)

    ReplyDelete
  2. Hi Chiranjeevi,
    Attachment mandatory code is working fine in English pages but in Arabic it is not. Can u help me out?

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. Hi, how can we do the same functionality in 12.2.10 ?? The above code is not working as expected. Please suggest

    ReplyDelete