How to Create and Test a Simple Page
Posted on March 20, 2009How to Create and Test a Simple Page
In this tutorial we offer the minimal tasks for building a query-only web form using OA Framework. We create the form using declarative steps. That is, we do not enter Java to build the web page. Instead we choose options from menus and set object properties. We developed this tutorial for a R12 E-Business Suite instance, but you can use it for an 11i instance, as well, although the screens will be different.
Setup
- Download and install JDeveloper with OA Framework extension. See Metalink Note: 416708.1 "How to find the correct version of JDeveloper to use with eBusiness Suite 11i or Release 12". You should follow the instructions for downloading the appropriate .dbc file for your system. See the topic "Setting Up Your Development Environment" in Chapter 1 of the "Oracle Applications Framework Developer's Guide".
- Identify or create a valid E-Business Suite user and grant them the responsibilities: OA Framework ToolBox Tutorial and OA Framework ToolBox Tutorial Labs.
- This tutorial uses the EMP table from the SCOTT/TIGER schema. Make sure the user APPS has, at a minimum, SELECT privilege on that table.
- You should know the location of you JDeveloper install. See your OS for the JDEV_USER_HOME environment variable. It may look something like: c:\oracle\jdeveloper_R12\jdevhome\jdev
- The default install of JDeveloper created a directory
/myprojects. In this tutorial we will refer to this path as .
- Any E-Business Suite customization should be shielded from updates by name and location. OA Framework customizations are no different. This tutorial will use the reference
where you should enter a unique name, such as XXABC. - Any E-Business Suite customization should be shielded from updates by name and location. OA Framework customizations are no different. This tutorial will use the reference
JDeveloper
This tutorial will walk you through these tasks:- Create a new OA workspace
- Create an application module
- Create a view object
- Edit the application module
- Create a web page
- Edit page object
- Test the page
At the end you will have a queriable page with the look-and-feel of a Apps web form. A future posting will offer the steps for deploying this form from E-Business Suite.
Create a New OA Workspace
A workspace is a grouping of files related to an application. In this step we will create a workspace and enter the database connection information.- After starting JDeveloper, select either the System Navigator or Applications Navigator tab
- Right-click the Applications top-level node
- From the popup menu select OA Workspace. (See image below.)
- The New Workspace Dialog box appears. (See image below.) In the file name enter: EmployeeWS

- Make sure the New OA Project checkbox is checked and click OK
- The OA Project Wizard will appear. If the welcome page appears, click: Next
- In step 1 of the wizard, replace the default Project Name with: EmployeePR
- Leave the default package blank
- Click Next
- On Step 2, Click Next
- On Step 3, complete the fields in the Connection region. Use the Browse button to select the .dbc file for your environment. Enter the valid E-Business suite username/password identified in the Setup section of this document.
- In the Responsibility region of this page, make sure the application short name is AK and the responsibility key is FWK_TBX_TUTORIAL. (You have a valid application short name and responsibility key, and the responsibility must be assigned to user.Click Finish
Create an Application Module
This step will create an Application Module, required for creating our web page.- Right-click on EmployeePR project and select New...
- In the New Gallery window, open the Business Tier node
- Select Application Module from the Items window and click the OK button
- The Create Application Module wizard will appear. If the welcome page appears, click Next
- On Step 1 of the wizard, in the Package field enter:
.oracle.apps.ak.server (Note: OA Framework requires strict adherence to naming structures. See Chapter 8: Standards and Guidelines of Oracle Application Framework Developer's Guide for more information. - In the Name field enter: EmployeeAM. (See image below.)
- Click the Next button.
- Click the Finish button.
- In the Name field enter: EmployeeAM. (See image below.)
Create a View Object
Next, we define a view object that select specific columns from the EMP table.- Right-click on the server node for the new package (See image below.)
- Select New View Object. The Create View Object wizard will appear.
- If the welcome appears, click Next
- In step 1, make sure the package name reads:
.oracle.apps.ak.server (e.g. XXABC.oracle.apps.ak.server - In the name field enter: EmployeeVO. Click Next.
- Click Next until you reach Step 5 of the wizard.
- In the Query Statement region enter (See image below):
SELECT empno, ename, job, hiredate, sal FROM scott.emp
- Click the Test button. If you receive an error message, check the syntax and EMP table privleges. (Note, in our case we granted SELECT privilege to the user APPS, but we did not create a synonym. Thus we needed to include the schema owner, SCOTT._)
- Click Next until you reach Step 8 of the wizard.
- Uncheck Generate Java File for the View Object Class, but do check the Generate Jave File for the View Row Class. (See image below.)
- Click Finish
Edit the Application Module
After creating the View Object, we need to relate the View Object with the Application Module.- If not visible, expand the hierarchy of the project to display the EmployeeAM object.
- Right-click the EmployeeAM object and select Edit EmployeeAM (See image below.)
- The Application Module Editor appears. (See image below.) The right-hand portion of the window should be title Data Model. From the Available View Objects region of the page, find the EmployeeVO object. Select this and shuttle it to the Data Model portion of the page. (Note, JDeveloper will list the object as EmployeeVO1.)

- Click: OK
Create a Page
We need to create a Web page as the last object.- Right-click on the AK node for the package and select New...
- The New Gallery window appears.(See image below.) In the categories list, expand the Web Tier node.
- Click OA Components.
- From the Items list (right-side), select Page
- Click: OK
- The New Page dialog box appears. (See image below.) In the Name field enter: EmployeePG
- In the Package field enter:
.oracle.apps.ak.webui
Edit the Page Object
JDeveloper created an empty page object. We need to add components to this object. In this section we will:- Set page object properties
- Add product brand image (required by OA Framework guidelines)
- Add a query region
- Apply a results table to the query region
The default components of the page include a region and an image (See image below.)

Set page object properties
- Select the region1 component. The Property Inspector diplays the properties. If you do not see the Property Inspector, display it by navigating to the View menu and selecting Property Inspector.
- Set the following properties:
| Property | Value |
| ID | PageLayoutRN |
| AM Definition | |
| Window Title | Scott's Employees |
| Title | Employees |
| Auto Footer | True |
Add product brand image
- Right-click on the PageLayoutRN component.
- From the popup menu select ProductBranding
- JDeveloer creates a node in the EmployeePG hierarchy and creates an object called item1. Select item1
- Use the table below to set the properties for item1.
| Property | Value |
| ID | ProdBrand |
| Image URL | FNDTAPPBRAND.gif |
Add a region
Within a web page we place content within regions. This step will create a new, empty region.- Right-click on the PageLayoutRN component
- Select New and then Region
- JDeveloper creates a region object called region1
- Use the table below to set the properties for region1
| Property | Value |
| ID | QueryRN |
| Region Style | query |
| Construction Mode | resultsBasedSearch |
| Include Simple Panel | True |
| Include View Panel | True |
| Include Advanced Panel | True |
Apply a results table to the query region
Within a region, we can place content. Here we will add a results table.- Right-click on the QueryRN component
- Select New and then Region Using Wizard
- If the Welcome page appears, click Next
- On Step 1, use the Application Module drop-down and select
.oracle.apps.ak.server.EmployeeAM - In the Available View Usages you should see: EmployeeVO1
- Select EmployeeVO1 and click Next
- In Step 2, set Region ID to ResultsTable and Region Style to table
- Click Next
- In Step 3, use the Add All button >> to move all fields from the Available window to the Selected window
- Click Finish
Test the Form
At this point we have the basic components to run a query-only web form.- Right-click the EmployeePG component from either Application Navigator or the Structure window.
- From the popup menu, select Rebuild (See image below.)

- If you encountered errors, correct them by reviewing this tutorial
- When you receive a clean (error-free; warnings are expectetd) compile, right-click the EmployeePG component and select Run. If you receive an error, review the posting Setting up OA Framework for solutions.
- After a few moments, the web form will appear (See image below.)

- Click the OK button to execute a blind query (See image below.)

0 Comments
