• 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

OAF Miscellaneous

Oracle Apps Framework MDS Repository

October 28, 2012 by techhoneyadmin

Heard it already? Yes, it’s one of the most important aspects of OA Framework that mostly remains invisible for the engineers working on OAF. So let’s dig into it and try to find out more about the MDS.

MDS stands for Meta Data Services and it is the declarative metadata repository used with OA Framework applications. Yes, I know that was a hard jargon ;). To be simple MDS is just an oracle database. As it’s an oracle database it can be managed using standard database procedures and tools.

It is essentially a database, which comes pre-seeded with schemas to support Oracle e-business Suite. These stored schemas are used by OA Framework to determine the layout of the OA framework pages.

To maintain the HTML rendering property of an OAF page the OA Framework makes the use of UI XML. The UI XML is used to describe the hierarchy of the components and also the components themselves on an OA Framework page. It’s all the power of UIX that allows metadata to be translated to an HTML page for a web browser or mobile device browser.

The whole OA Framework page is stored in the form of XML files in the exact format as defined by the MDS. Whenever a personalization is created through the OA Personalization Framework that personalization is added on top of the base product Meta data. Hence, the newly created personalization just sits on top of the base product UI and also on the base personalization, therefore the base personalization are not affected during patch application or while doing upgrades.

JDR_UTILS PL/SQL package supports the MDS repository and can be used to query and maintain the repository.
Now let’s see how, all that is mentioned above, happens.
MDS repository has 4 tables in all. Just 4 tables? Yes you heard it right it has only 4 tables and that’s it. These 4 tables can manage all the stuff that we have discussed till now.
These 4 tables are:
1. JDR_PATHS: Stores the path of the documents, OA Framework pages and their parent child relationship.
2. JDR_COMPONENTS: Stores components on documents and OA Framework pages.
3. JDR_ATTRIBUTES: Stores attributes of components on documents and OA Framework pages.
4. JDR_ATTRIBUTES_TRANS: Stores translated attribute values of document components or OA framework pages.

For your understanding I request you to please query these tables to find out how an OA Framework page is stored in MDS. It’s really fun to learn how a whole page along with all the information is just handled in only 4 tables. Just query them.

Thank you for your support.
Till the next post
Happy Learning

Filed Under: OAF Miscellaneous Tagged With: jdr tables in oa framework, MDS in oa framework, mds in oaf, meta data services in oaf, oa framework jdr tables, oa framework mds, oaf mds, oaf meta data services, What is MDS in oa framework, what is mds in oaf, what is oa framework mds, what is oaf mds, what is oaf meta data services

How to execute a parameterized PL SQL stored procedure from an OA Framework page?

October 28, 2012 by techhoneyadmin

Today, we will discuss on how to call a PL SQL stored procedure, which takes in and returns parameters, from an OA Framework page controller.

Before starting the discussion, I assume that you have a valid PL SQL package created and compiled in the database, also I assume that the name of the PL SQL package is xx_trial_package and the name of the procedure is xx_trial_proceudure, and the procedure takes an integer (person_id as first parameter) and returns two strings (employee_number and full_name as second and third parameter) respectively. Also I assume that the name of the AM is xxTrialAM.

Let’s do this in steps for easy understanding and remembrance.
note Please 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.

Step 1: First step is to import your application module xxTrialAM into the controller (say xxTrialPGController) and then import the following packages also into your controller.

import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.jdbc.OracleCallableStatement;
import java.sql.SQLException;
import oracle.jdbc.OracleTypes;

Step 2: Now, before the processrequest method in the controller create handles for xxTrialAM, OADBTransaction , OracleCallableStatement and also create a new variable of String type as shown below
private xxTrialAM am ;
public OADBTransaction dbtrans;
public OracleCallableStatement callablestatement
String query_String = new String();
String employee_number = new String();
String full_name = new String();

Step 3: In the processrequest method after the
super.processRequest(pageContext, webBean);
line write the following lines of code
am = (xxTrialAmImpl)pageContext.getApplicationModule(webBean);
dbtrans = am.getOADBTransaction();

Step 4: Now, as mentioned earlier the String type that we have created will come into picture.
Just write the code as
query_String = “BEGIN xx_trial_package.xx_trial_procedure(:1,:2,:3);END;”;
callablestatement=(OracleCallableStatement)dbtrans.createCallableStatement(query_String,0);
try
{
callablestatement.setInt(1,pageContext.getEmployeeId());

/*Here the setInt() method is used as the parameter that we have to pass to the procedure is of the type Integer. If the parameter is of String type then use setString method. If the parameter is of some other type then use the appropriate setter method. Also note that in the setInt() method in the example the first parameter is 1 which corresponds to the 1st parameter in the procedure.*/

callablestatement.registerOutParameter(2,OracleTypes.VARCHAR,0);
/*This line registers the parameters that will be given out by the procedure after successful execution. Note that in the registerOutParameter() method the number 2 corresponds to the 2nd parameter from the procedure.*/
callablestatement.registerOutParameter(3,OracleTypes.VARCHAR,0);
callablestatement.execute();
employee_number = callablestatement.getString(2);

/* in this line we are getting the value of the out parameter number 2 into a local variable.*/
full_name = callablestatement.getString(3);
callablestatement.close();
}
catch (SQLException e)
{
System.out.println(“The Error is ” + e);
}

And it’s done.
You have just now executed a PL SQL stored procedure, which takes parameters and return values, from OA Framework page controller.
Till my next post, take care and thanks for reading 🙂

Filed Under: OAF Miscellaneous Tagged With: how to pass paranters to PL SQL stored procedure from OA Framework page, OA framework calling a PL SQL procedure, passing parameters to PL SQL procedure from controller in OA Framework

How to execute a PL SQL stored procedure from an OA Framework page?

October 28, 2012 by techhoneyadmin

Executing a PL SQL stored procedure from an OA Framework page is a very common requirement and that’s the reason why we will discuss this today. There are many ways to do this, you can use a callablestatment and execute a package or you can also create a concurrent program and then call that concurrent program from OA Framework page to execute the PL SQL stored procedure.
We will take a look at the first method here i.e. calling a PL SQL stored procedure using a callablestatment from OA Framework page.

Before starting the discussion I assume that you have a valid PL SQL package created and compiled in the database, also I assume that the name of the PL SQL package is xx_trial_package and the name of the procedure is xx_trial_proceudure. Also I assume that the name of the AM is xxTrialAM.
Let’s do this in steps for easy understanding and remembrance.

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

Step 1: First step is to import your application module xxTrialAM into the controller (say xxTrialPGController) and then import the following packages also into your controller.

import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.jdbc.OracleCallableStatement;
import java.sql.SQLException;

Step 2: Now, before the processrequest method in the controller create handles for xxTrialAM, OADBTransaction , OracleCallableStatement and also create a new variable of String type as shown below
private xxTrialAM am ;
public OADBTransaction dbtrans;
public OracleCallableStatement callablestatement
String query_String = new String();

Step 3: In the processrequest method after the
super.processRequest(pageContext, webBean);
line write the following lines of code

am = (xxTrialAmImpl)pageContext.getApplicationModule(webBean);
dbtrans = am.getOADBTransaction();

Step 4: Now, as mentioned earlier the String type that we have created will come into picture.
Just write the code as
query_String = “BEGIN xx_trial_package.xx_trial_procedure();END;”;
callablestatement=(OracleCallableStatement)dbtrans.createCallableStatement(query_String,0);

try
{
callablestatement.execute();
callablestatement.close();
}
catch (SQLException e)
{
System.out.println(“The Error is ” + e);
}

And it’s done.
You have just now executed a PL SQL stored procedure from an OA Framework page. In my next post we will take a look at how to execute a PL SQL procedure, which takes parameters and return values, from OA Framework page.
Till then, take care and thanks for reading 🙂

Filed Under: OAF Miscellaneous Tagged With: execute a plsql procedure from controller, how to execute a pl sql stored procedure from oa framework controller, howto execute a pl sql stored procedure, oa framework execution of pl sql stored prodecure

How to disable global buttons in OA Framework page?

October 27, 2012 by techhoneyadmin

Before starting the post I want to say sorry to everyone as I was very busy with my personal life and was unable to dedicate any time to post any new articles to the blog. But now I am back and will try my level best to keep the posting new articles as frequently as possible.
Moving on to the topic of today, we will discuss how to disable Global Button which appear on an OA Framework page.
This can be a very typical requirement but doing this is still very easy. Disabling all the global buttons that appear on the OA Framework page is easy and the code below will suffice.
Assumptions:
1. You already have a page say XXTrialPG and have a pagelayout region in the page.
2. You have imported all the required classed to the controller say XXTrialCO of XXTrialPG
Let’s understand this in steps.
Step1: Create a handle of the pageLayout Region of your page(XXTrialPG)
OAPageLayoutBean page = (OAPageLayoutBean)pageContext.getPageLayoutBean(); page.prepareForRendering(pageContext);
Step2: Create a handle of the pageLayout Region of your page(XXTrialPG)
OAGlobalButtonBarBean buttons = (OAGlobalButtonBarBean)page.getGlobalButtons();
buttons.setRendered(false);

That’s it 🙂
Happy Learning

Filed Under: OAF Miscellaneous Tagged With: disable global buttons on oa framework page, How to disable global buttons in OA Framework page, oa framework disable global buttons

How to refresh an OA Framework page using Java Script?

October 27, 2012 by techhoneyadmin

Hey there, today we are going to look at some javascript implementation in OA Framework and as the title of the post suggests we will see that how can we refresh an OA Framework page using javascript.

Assumptions:
1. You already have an OA Framework page (XXTrialPG).
2. You have a controller (XXTrialCO) attached to XXTrialPG.
3. You want the OA Framework page to refresh in every 20 seconds.
4. You have imported all the required regions and/or items in XXTrialCO.

Let’s take this in steps for easy remembrance.

Step1. Create a handle for OABodyBean
OABodyBean bodyBean = (OABodyBean) pagecontext.getRootWebBean();

Step2. Create a variable of String type and assign the below mentioned javascript code to the string variable.
String javaS = “javascript:setTimeout(‘window.location.reload()’,20000)”;

Note: Here 20000 means 20 seconds mentioned in milliseconds

Step3. Set the String variable on the onLoad() method of OABody bean, this will ensure that when the OA Framework page is rendered, the corresponding javascript code is triggered
bodyBean.setOnLoad(javaS);

That’s it Folks.
Thanks for reading.
Till the next post
Take Care

Filed Under: OAF Miscellaneous Tagged With: how to refresh an oa framework page using java script, Java script in oa framework, oa framework page and java script

  • « Go to Previous Page
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Page 5
  • Go to Next Page »

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