Wednesday, January 30, 2013

OAF : Method to set the hyperlink to the link bean to open the website in new window


OAF : Method to set the hyperlink to the link bean to open the website in new window

 OALinkBean linkBean = (OALinkBean) webBean.findIndexedChildRecursive("descriptionLinkID");
//here we are referring to Link Bean in Description Column


  OADataBoundValueViewObject bindValue = new OADataBoundValueViewObject(linkBean, "Hyperlink");
// We are bounding the value  "Hyperlink" to the link bean  , so it will display Description on the output and Click on //it will navigate to the binded Hyperlink.

  linkBean.setAttributeValue(linkBean.DESTINATION_ATTR, bindValue); 


Database Table is having 3 columns
Description, Hyperlink, DocumentType

Clicking on the link in the description column will open the website in new window.

I hope that the above code will help..



Post a Comment