0% found this document useful (0 votes)
154 views5 pages

Displaying Data From Data Base: Home Oracle Application Framework Oaf Tutorials

This document provides instructions for displaying data from a database in Oracle Application Framework (OAF). It describes creating a view object (VO) to query the database, attaching the VO to an application module, creating a region on a page to display the data, and writing code in a controller to execute the query and display the records when a button is clicked. The steps are: 1) Create a VO to query the database table, 2) Attach the VO to an application module, 3) Create a region on a page to display the records using the VO, 4) Write code in a controller to execute the query and display results when a button is clicked.

Uploaded by

Oracle developer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views5 pages

Displaying Data From Data Base: Home Oracle Application Framework Oaf Tutorials

This document provides instructions for displaying data from a database in Oracle Application Framework (OAF). It describes creating a view object (VO) to query the database, attaching the VO to an application module, creating a region on a page to display the data, and writing code in a controller to execute the query and display the records when a button is clicked. The steps are: 1) Create a VO to query the database table, 2) Attach the VO to an application module, 3) Create a region on a page to display the records using the VO, 4) Write code in a controller to execute the query and display results when a button is clicked.

Uploaded by

Oracle developer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Displaying Data From Data Base

 HOME
 ORACLE APPLICATION FRAMEWORK
 OAF TUTORIALS
 DISPLAYING DATA FROM DATA BASE

In this lesson we are going to see how to display a data from the data base in OAF.
Follow the steps to display the data in OAF page from the Data Base:

1. Create the page.


2. Create the VO in respective BC4J and attach it to AM.
3. Create the controller and write the logicode in Process Form Request.

To create a VO right Click on the Resources Folder of the project and then select New View Object…
To see all the steps that how to create the VO we can see in previous chapter.
Write the following Query statement in VO
SELECT * FROM mtl_system_items_b WHERE  ROWNUM < 101
After creating VO attach VO to AM (Application Module).
Now select main page right click on the main region select New -> Region Using Wizard…

After selecting Region Using Wizard then a welcome window will get open as shown below:
Click on Next button to see the first step:

After selecting proper AM we can see the VO attached to that AM in the Available View Usages, which is
shown below:

Click on Next button, in Step2 window select Region Style as “table“, the same scenario is shown in the below
figure:
In the next window we will find all the available attributes and in that select the attributes whichever required
to display

Click on Next button then we will find a window in that we can change the prompt names if required and also
the style of the item we can change here we are taking all the items as Message Text input types.

Click on Next button and then click on the finish button.


After creating Region Using Wizard now create one more item and the Item Style is “Submit Button”. So that

the page structure looks like the following:


Now create one controller on the main region. Right click on the region1(Main region id) and then select Set
New Controller…
Now after creating the controller write the following code in the process Form Request.
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
if(pageContext.getParameter(“item1”)!=null)
{
/* The below code line is used to initialize the application module */
OAApplicationModule am=(OAApplicationModule)pageContext.getApplicationModule(webBean);
/* The below code line is used to initialize VO*/
OAViewObject vo=(OAViewObject)am.findViewObject(“ItemsVO1”);
/* ItemsVO1 is the instance name in AM which is the original name of the VO */
vo.executeQuery();
}
}
Rebuild the code, run the page and see the output:

Click on the “Go” button so that it will display the records as shown below

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy