• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / OAF Miscellaneous / How to embed custom HTML code in OAF Page

How to embed custom HTML code in OAF Page

October 28, 2012 by techhoneyadmin

It’s always that all the text on an OA Framework page is in black color. Ever thought of having a text in other color e.g. a note just after a table in a smaller font and in red color?

Here we will have a look at how to embed a custom HTML code in OA framework page and have a different color to that HTML text so that the text looks different from the rest of the text on the OA Framework page.
In order to do this, we need to use the OARawTextBean as it’s the only OAF item bean which supports the use of HTML tags.

Before discussing further I assume that you have an OA framework page e.g. xxTrialPG and also a controller to that page like xxTrailController.
Also I assume that you have created an OARawTextBean under the pagelayout region and the id of the OARawTextBean is xxTrialRawTextBean.

notePlease note that all the lines that come in italics are the java code lines, this is done for easy segregating code from text in the post.

Again, let’s take this in steps for easy understanding and remembrance.

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

code to embed custom HTML code in OA Framework Page

Step 3: – Set the String variable as the text to the OARawTextBean as shown below and run the page.

trialRawTextBean.setText(theHTMLCode);

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

How to embed custom HTML code in OA Framework Page

Filed Under: OAF Miscellaneous Tagged With: embed custom HTML code in oa framework, embed custom html code in oaf, how to embed custom HTML code in OA framework, OArawtextBean custom HTML in oa framework, write custom html in oa framework page

Copyright © 2023 · Parallax Pro on Genesis Framework · WordPress · Log in