Monday 18 July 2011

Adding Custom Html code to the OAF Page

/* adding html code to the OAF page */

Step1: -  Import the OARawTextBean in the controller so we will be able to create handles for it. Import the OARawTextBean bean as shown below.
                 import oracle.apps.fnd.framework.webui.beans.OARawTextBean;
Step2: -  In the processrequest method create a handle for the OARawTextBean and create a String to write the HTML code in it.

OARawTextBean trialRawTextBean = (OARawTextBean)webBean.findChildRecursive(“xxTrialRawTextBean “);
String theHtmlCode = "<html><body><p style= \"font-family:Arial,Helvetica,Geneva,sans-serif:font-size:10pt;color:blue\">This is an example to to show how to add the custom html code to the OAF page "+"</p></body></html>"

Step3:- Set the String variable as the text to the OARawTextBean as shown below and run the page
trialRawTextBean.setText(theHTMLCode);

Step4:- You should be able to see the Text that you have written as shown below in your OAF Page.

No comments:

Post a Comment