100% found this document useful (1 vote)
317 views86 pages

OAF Training

The Oracle Application Framework (OA Framework) is a Model-View-Controller (MVC) framework built using J2EE technologies. It provides the core architecture for developing HTML-based Oracle business applications. The key components of the MVC architecture in OA Framework are the Model, which contains the business logic and data; the View, which defines the user interface; and the Controller, which handles user interactions and directs workflow. The Model is implemented using Oracle Business Components for Java, including Entity Objects, View Objects, and Application Modules.

Uploaded by

azees.haseena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
100% found this document useful (1 vote)
317 views86 pages

OAF Training

The Oracle Application Framework (OA Framework) is a Model-View-Controller (MVC) framework built using J2EE technologies. It provides the core architecture for developing HTML-based Oracle business applications. The key components of the MVC architecture in OA Framework are the Model, which contains the business logic and data; the View, which defines the user interface; and the Controller, which handles user interactions and directs workflow. The Model is implemented using Oracle Business Components for Java, including Entity Objects, View Objects, and Application Modules.

Uploaded by

azees.haseena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 86

Hitachi Consulting, Hyderabad

ORACLE APPLICATIONS FRAMEWORK


(OAF) TRAINING

Page 1 of 86
Hitachi Consulting, Hyderabad

TABLE OF CONTENTS

What is OA Framework ...................................................................................... 4


Prerequisites ...................................................................................................... 4
OA Framework MVC Architecture .................................................................... 5
Model: .....................................................................................................................6
View: .......................................................................................................................7
Controller: ...............................................................................................................7
Intercation between Model,View and Controller ...................................................9
Onion Architecture of OA Framework .................................................................10
Why OA Framework ......................................................................................... 11
Development Environment Setup ................................................................... 12
Which version of JDeveloper ...............................................................................12
Release 12.0 ..................................................................................................12
Task:1 Configure the JDEV_USER_HOME environment variable ....................13
Task 2: Obtaining a Database Connection File ....................................................14
Task 3: Creating a Desktop Shortcut to JDeveloper.............................................14
Task 5: Test your Setup included oracle training workspace. ..............................15
JDeveloper Structure ....................................................................................... 16
Building Hello World Page ............................................................................. 18
Hello, World Lab Goals ........................................................................................18
Step 1. Create a New OA Workspace and Empty OA Project with the New...
Dialog. ...................................................................................................................19
Step 2. Set Run Options in OA Project Settings...................................................25
Step 3. Create the OA Components Page File ......................................................26
Step 4. Modify the Page Layout (Top-level) Region ...........................................31
Step 5. Create the Second Region (Main Content Region) ..................................33
Step 6. Create the First Item (Empty Field)..........................................................34
Step 7. Create a Container Region for the Go Button ..........................................36

Page 2 of 86
Hitachi Consulting, Hyderabad

Step 8. Create the Second Item (Go Button) ........................................................38


Step 9. Save Your Work .......................................................................................39
Step 10. Run Your Page Using the Run Option ...................................................40
Step 11. Add a Controller .....................................................................................43
Step 12. Edit Your Controller ...............................................................................44
Step 13. Build Your Controller .............................................................................47
Step 14. Test Your Work Using the Run Option ..................................................48
Display User Name and Responsibility Name. .............................................. 49
Validating between Two fields ............................................................................. 55
Building Search Page ...................................................................................... 62
Search Lab Goals ..................................................................................................62
Task 1: Create Workspace and Project .................................................................63
Task 2: Create The Page. ......................................................................................64
Step 3.1 Create Your Root UI Application Module (AM) ..............................65
Step 3.2 Enable Passivation for the Root UI Application Module ..................66
Step 2.6 Create an Employee Entity Object (EO) ...........................................67
Step 2.8 Create an EmployeeSearchVO ..........................................................69
Step 2.9 Add Your View Object to the Root UI Application Module ............70
Task 3: Create Your Initial Page ..........................................................................71
Task 4: Configure a Results-Based Search...........................................................71
Step 4.1 Add a Query Bean to Your Page .......................................................72
Step 4.2 Add a Results Data Table to Your QueryRN ....................................73
Step 4.3 Set or Verify Your ResultsTable Region Properties .........................74
Step 4.4 Set or Verify EmpNum Item Properties ............................................74
Step 4.5 Set or Verify EmpName Item Properties ...........................................75
Step 4.6 Set or Verify Email Item Properties .................................................75
Step 4.8 Test Your Work .................................................................................75
Task 5: Convert Your Search Region to Use Auto Customization Criteria .........76
Step 5.1 Change the Query Bean to Use autoCustomizationCriteria ..............77
Page 3 of 86
Hitachi Consulting, Hyderabad

Step 5.2 Add a Simple Search Region .............................................................77


Step 5.3 Create an Employee Name Search Item ............................................78
Step 5.4 Create an Employee Number Search Item ........................................78
Step 5.5 Create Search Mappings Between Your Name / Number Items and
the ResultsTable ...............................................................................................79
Task 6: Add a List of Values (LOV) to Your Employee Name Field ..................80
Step 6.1 Create the BC4J Package for Your LOV-Related Model Objects ....80
Step 6.2 Create a Common LOV Application Module....................................80
Step 6.3 Create the LOV View Object ............................................................81
Step 6.4 Add the EmployeeNamesVO to the LabsLovAM .............................82
Step 6.5 Create the Shared EmployeesLovRN LOV Region ..........................82
Step 6.6 Add a Table to Your LOV .................................................................83
Step 6.7 Make the Employee Name Item an LOV ..........................................84
Step 6.8 Define LOV Mappings ......................................................................85
Step 6.9 Test Your Work .................................................................................85

What is OA Framework

Oracle Application Framework (OA Framework) is the Oracle Applications


development and deployment platform for HTML-based business applications.

The OA Framework is a Model-view-controller (MVC) framework built using


J2EE (Java 2 Platform, Enterprise Edition) technologies.

Prerequisites
• Basics of Java or OOPs (Object Oriented Programming) is needed.
• Basics of XML is needed.
• Understand the MVC Architecture
• Have Oracle apps 11i or higher version to play around with.

Page 4 of 86
Hitachi Consulting, Hyderabad

OA Framework MVC Architecture

OA Framework works with MVC Architecture which is Model,View and


Controller Architecture.
The MVC architecture is a component-based design pattern with clean
interfaces between the Model, View, and Controller.
The Model is where the application implements its
business logic.
The View is where the application implements its user interface.
The Controller is where the application handles user interaction and directs
business flow.

Page 5 of 86
Hitachi Consulting, Hyderabad

Model:

1. Model is Data

2. Model is Implemented using following Oracle Business Components for


Java (BC4J).

EO (Entity Object)

 Entity Object is based on database table or other data source.


 Entity Object contains attributes which represent database
columns.
 All insert/update/delete (DML Operations) transactions go through
EO to database.

VO (View Object)

 Two types of View Objects:


o SQL based
o EO based
 Represents a query result.
 Is used for joining, filtering, projecting, and sorting your
business data.
 Can be based on any number of entity objects (EOs) and
provides access to EOs.

AM (Application Module)

 Container for VOs.


 Every page must have a root application module.
 Handles transactions.

Page 6 of 86
Hitachi Consulting, Hyderabad

View:
View is User Interface.
Implemented using an Oracle technology called UIX.

(UIX = User Interface XML).

Controller:
Responds to user actions and directs application flow.
Model objects like EO and VO can't be accessed directly from theController
Class, except AM.
Controller Contains following methods
ProcessRequest: Fires when OAF page loads for the first time.
ProcessFormRequest: Fires when user submits the page.(Ex: clicking
SUBMIT button).
ProcessFormData: This method is hidden in the controller.Fires for
populating data from screen to view objects.

Page 7 of 86
Hitachi Consulting, Hyderabad

The Above Figure is conceptual illustration of OA Framework Model-View-


Controller Architecture.

Page 8 of 86
Hitachi Consulting, Hyderabad

Intercation between Model,View and Controller

View HTML Page

HTTP Request HTTP Response

Controller
Controller Class

AM
Model

VO EO

Database

The above Figure shows how model ,view and controller interacts with each other.

Page 9 of 86
Hitachi Consulting, Hyderabad

Onion Architecture of OA Framework

OA Framework applications can be abstracted into a series of concentric layers,


like an onion. The core layer represents the database and the surface layer
represents the application pages. In between is a number of business logic and user
interface layers. This layering allows for generic code and components to be
implemented at the inner layers to maximize their reuse across the outer layers.

Each layers knows about the layer below it.

The below figure is the Onion architecture of OA Framework.

Page 10 of 86
Hitachi Consulting, Hyderabad

Why OA Framework

Enterprise-Grade Performance and Scalability


Improved End User Productivity
Highly extensible architecture
Browser Look and Feel (BLAF terminology) for all applications
Open industry Standards such as XML, HTML, Java, JSP, SQL and Web
Services.

Page 11 of 86
Hitachi Consulting, Hyderabad

Development Environment Setup

Which version of JDeveloper


Developer must use the specific build of JDeveloper that corresponds to their
runtime environment.

Following table illustrates which JDeveloper ARU corresponds to the runtime


patch set installed in your R12.1 - Oracle Applications Instance

Environment:

Release 12.0

ATG Release 12 Version JDeveloper 10g Patch

12.0.0 Patch 5856648 10g Jdev with OA Extension

12.0.1 (patch 5907545) Patch 5856648 10g Jdev with OA Extension

Patch 6491398 10g Jdev with OA Extension ARU


12.0.2 (patch 5484000 or 5917344)
for R12 RUP2 (replaces 6197418)

Patch 6509325 10g Jdev with OA Extension ARU


12.0.3 (patch 6141000 or 6077669)
for R12 RUP3

Patch 6908968 10G JDEVELOPER WITH OA


12.0.4 (patch 6435000 or 6272680)
EXTENSION ARU FOR R12 RUP4

12.0.5 (No new ATG code released) No new JDev patch required

Patch 7523554 10G Jdeveloper With OA Extension


12.0.6 (patch 6728000 or patch 7237006)
ARU for R12 RUP6

Refer to Metal ink document id ID 416708.1 for more details.

Download the specific JDeveloper version from the Metalink.

Page 12 of 86
Hitachi Consulting, Hyderabad

Following steps are needed for environment setup:

• Configure the JDEV_USER_HOME environment variable.


• Obtain a database connection file.
• Create a desktop shortcut to JDeveloper.
• Launch JDeveloper and configure the database connection and user.
• Test the setup.

Task:1 Configure the JDEV_USER_HOME environment variable

1. Go to your desktop and select My Computer, right-click and select


Properties.
2. On the System Properties dialog, select the Advanced tab.
3. On the Advanced page, select the Environment Variables... button.
4. On the Environment Variables dialog, select the New... button from the User
variables for <username> box.
5. On the New User Variable dialog, enter JDEV_USER_HOME in the
Variable Name field. Set the
6. Variable Value field to <drive>:\jdevhome\jdev where <drive> is the drive
where you installed the
7. JDeveloper10.1.3.3.0 OA Extension zip file. For example: c:\jdevhome\jdev.
8. Select OK in each of the dialogs you opened to save the new user
environment variable.
Warning: The variable value should not contain a leading space before the
drive name. If it does, your
Environment will not work properly.

Page 13 of 86
Hitachi Consulting, Hyderabad

Task 2: Obtaining a Database Connection File

Obtain the FND database connection (.dbc) file from the system
administrator who installed the OA Framework database where you want to
do your development. Place this file in the
<JDEV_USER_HOME>\dbc_files\secure directory.

Task 3: Creating a Desktop Shortcut to JDeveloper

To facilitate launching JDeveloper, create a desktop shortcut to


jdevbin\jdev\bin\jdevw.exe.

Task4:Configuration steps for Including oracle standard training


workspaces in JDeveloper,Configure Database Connection and
User.

1. Use this procedure to launch JDeveloper and configure the database


connection and user:
2. Select the desktop shortcut created in Task 3 to launch Oracle10g
JDeveloper.
3. Select File > Open from the main menu, then navigate to
<JDEV_USER_HOME>\my projects. Open the
4. OA Framework Toolbox Tutorial workspace file (toolbox.jws).
5. Expand the toolbox.jws in the JDeveloper System Navigator, to display its
contents. Select the Tutorial.jpr project, then select Project > Project
Settings.
6. Expand the Oracle Applications node, which is In the Project Settings
dialog, and select Runtime
7. Connection.
8. Locate the DBC file that you saved in Task 2 by using the Browse... button,
which is In the Connection box. The file should be in the
<JDEV_USER_HOME>\dbc_files\secure directory.
9. Specify the User Name and Password for the test user. This is the user that
you assigned the ToolBox responsibilities to in Task 4. Select OK.

Page 14 of 86
Hitachi Consulting, Hyderabad

10.Select Tutorial.jpx in the System - Navigator pane, then select Edit Tutorial
from the context menu. Verify that the Connection Name is set correctly.
Select Apply, then OK.
11.Repeat Steps 3 - 7 for the LabSolutions.jpr project.
12.Expand the Connections node in the JDeveloper System Navigator and then
expand the Database node. Right-click on the Database node and select New
Connection... to open the Connection Wizard. Follow the JDeveloper
instructions to define a new database connection for the Oracle Applications
13.database identified by the DBC file you selected above.
14.Select the Tutorial.jpr project In the System Navigator. Right-click and
select Edit Business
15.Components Project....
16.Select the Connection option in the Business Components Project Wizard
and set the Connection
17.Name to the connection you just defined. Select OK to save your changes.
18.Repeat steps 9 - 11 for the LabSolutions.jpr project.

Task 5: Test your Setup included oracle training workspace.

Perform the following steps to test your setup:


Tip: Use Internet Explorer 5.0+ as your default browser if you want pages to look
as they do in the OA
Framework ToolBox Tutorial / Sample Library.
1. Open the toolbox.jws workspace in the JDeveloper Navigator using the
instructions in Task 5 above.
2. Go to the System Navigator, select toolbox.jws and then select Project > Rebuild
toolbox.jws from the
Main menu. You should get 0 errors (warnings are okay and expected).
3. Go to the System Navigator, expand the Tutorial.jpr project again, then select
Project > Show Categories from the main menu.
Note: this helps to organize the files in a large project.
4. Expand the HTML Sources category beneath Tutorial.jpr. Select
test_fwktutorial.jsp, then select Run >
Run test_fwktutorial.jsp from the main menu. Perform the following:
Select Hello, World! From the list of lesson links displayed on the Test Framework
Toolbox Tutorial

Page 15 of 86
Hitachi Consulting, Hyderabad

Page. This runs a very simple page.


Note: If you can't run the Hello, World! page, revisit the steps listed above to
ensure that you
completed everything correctly. If the problem persists, follow the support
procedure described in the Release Notes accompanying this ARU.

JDeveloper Structure
Below figure show the standard component structure in jdeveloper

Level 1: OAWorkspacte.jws

Level2: OAProject.jpr

Level3: < CutomTop>.oracle.apps.<APPL_TOP_NAME>.schema.server


contains EO –Entity Object
< CutomTop>.oracle.apps.<APPL_TOP_NAME>.server contains

Page 16 of 86
Hitachi Consulting, Hyderabad

AM –Application Module+
< CutomTop>.oracle.apps.<APPL_TOP_NAME>.webui contains
PG -Page
Top Most level is OAWorkspace which contains Projects. Projects contains the
Entity objects ,view objects and Application Module components.

Page 17 of 86
Hitachi Consulting, Hyderabad

Building Hello World Page

Hello, World Lab Goals

After completing this exercise, you should have learned how to:
• Create an Oracle Applications (OA) JDeveloper10g workspace and project.
• Configure a project to enable Developer Mode testing and diagnostics.
• Use the JDeveloper10g OA Extension to create a very simple page.
• Create a controller and associate it with a region.
• Handle a submit button press action (an HTTP POST request).
• Run a page in regular and debug modes.

The page does nothing other than display a message when you enter a value in the
field and click the Go button. Your final layout looks like the following:

Page 18 of 86
Hitachi Consulting, Hyderabad

STEPS TO DEVELOP HELLO WORLD PAGE

Step 1. Create a New OA Workspace and Empty OA Project with the New...
Dialog.
Step 2. Set Run Options in OA Project Settings
Step 3. Create the OA Components Page File
Step 4. Modify the Page Layout (Top-level) Region
Step 5. Create the Second Region (Main Content Region)
Step 6. Create the First Item (Empty Field)
Step 7. Create a Container Region for the Go Button
Step 8. Create the Second Item (Go Button)
Step 9. Save Your Work
Step 10. Run Your Page Using the Run Option
Step 11. Add a Controller
Step 12. Edit Your Controller
Step 13. Build Your Controller
Step 14. Test Your Work Using the Run Option

Step 1. Create a New OA Workspace and Empty OA Project with


the New... Dialog.

Select File > New... to open the New... dialog (shown in the following diagram).
This dialog is also called the New Object Gallery.

Page 19 of 86
Hitachi Consulting, Hyderabad

Choose General > Workspace Configured for Oracle Applications from the
New... dialog, or highlight Workspaces in the Navigator and choose New OA
Workspace... from the context menu (right mouse button
menu that changes depending on the context). You'll be prompted to create an OA
workspace. Verify that the default workspace directory name points to your own
<JDEV_USER_HOME>\myprojects directory, as shown in the following diagram.
Modify the workspace file name as well (any name is okay for a workspace, such
as HelloWorldOAWorkspace.jws).
Check the Add a New OA Project check box.

Page 20 of 86
Hitachi Consulting, Hyderabad

After you click OK, you will see the Oracle Applications Project Wizard.
In Step 1 of the wizard, verify that the default project directory name points to your
own JDEV_USER_HOME\myprojects directory, as shown in the following
diagram.

Page 21 of 86
Hitachi Consulting, Hyderabad

In Step 2 of the wizard, verify that the XML Path points to your own
JDEV_USER_HOME\myprojects directory, as shown in the following diagram.
You can include additional directories in the XML Path field if you have files in
your project that do not reside under your myprojects directory. For your Hello
World project, you do not use the Repository for metadata in the database (the
Hello World example uses only the XML files). In regular development work,
where you use standard components that have been imported into the Repository,
you would check the Use Repository for Design Time check box and
provide connection information in Step 2.

Page 22 of 86
Hitachi Consulting, Hyderabad

In Step 3 of the wizard, adjust the runtime connection information, if necessary, for
the database and Oracle Applications username, password, and responsibility you
are using (it must be a valid user and responsibility for your installation).

Page 23 of 86
Hitachi Consulting, Hyderabad

Page 24 of 86
Hitachi Consulting, Hyderabad

Step 2. Set Run Options in OA Project Settings

To verify that your project includes all of the appropriate libraries, paths and other
settings, select your project in the Navigator and choose Project Settings... from the
context menu, or double-click on your project.
Select the Common > Oracle Applications > Run Options settings page. Select
OADeveloperMode and OADiagnostic, and move them to the On Options List.

• OADeveloperMode provides extra code checking and standards checking at


runtime.
• OADiagnostic enables the Diagnostics button in the global buttons at the
top of
the page, overriding any corresponding profile option set for the application.
Page 25 of 86
Hitachi Consulting, Hyderabad

You should always have these two modes turned on during development. The
other modes are generally used for testing towards the end of developing your page

Step 3. Create the OA Components Page File

Within your new workspace, select your new project (your .jpr file). To add an OA
Components page file to your project, choose New... from the context menu or use
File > New... on the main menu to open the New... dialog.

Page 26 of 86
Hitachi Consulting, Hyderabad

Select Web Tier > OA Components in the Categories column. Then select Page,
and press OK as shown in the following diagram:

You will then see a dialog box that asks for the name and package file for your
new page. This dialog box is shown in the following diagram:

Name your page XXHelloWorldPG. Your page name cannot include any spaces.

Page 27 of 86
Hitachi Consulting, Hyderabad

In the Package field, type the following:


xxhitachi.oracle.apps.po.xxhelloworld.webui
Your package file name (which determines the location of the XML page file in
the directory structure) should be set to
oracle.apps.<application_shortname>.<optional_modulename>.<optional_subc
omponent>.
webui (to comply with Oracle Applications directory structure standards), where
the application shortname is lowercase and is an existing Oracle Applications
product shortname, such as INV.
Be sure to follow the package name, directory location and object naming
standards in the OA Framework File / Package / Directory Structure standards.

Your initial page structure appears in the Structure window as shown below, with
an initial pageLayout region called region1, and a folder called pageLayout
Components. The pageLayout Components folder contains a standard corporate
branding image ("Oracle") that you cannot change (though you can add other
elements).

Page 28 of 86
Hitachi Consulting, Hyderabad

Step3.1 Create Application Module

Step3.2 Give the Name Application Module

Page 29 of 86
Hitachi Consulting, Hyderabad

Page 30 of 86
Hitachi Consulting, Hyderabad

Step 4. Modify the Page Layout (Top-level) Region

JDeveloper creates your top-level page layout region for you automatically when
you create your page.If the Property Inspector is not already open, select View >
Property Inspector from the main menu. You can alternate between the
alphabetical list of properties and the categorized list by clicking on the Categories
button at the top of the Property Inspector (shown above with categories enabled).
• Set the following properties for your page layout region:
• Set the ID property to PageLayoutRN.
• Verify that the Region Style property is set to pageLayout.
• Verify that the Form property is set to True.
• Verify that the Auto Footer property is set to True.
• Set the Window Title property to <your name>: Hello World Window Title.
This becomes the
• window title for the page.

Page 31 of 86
Hitachi Consulting, Hyderabad

• Set the Title property to <your name>: Hello World Page Header. This
becomes the page
• header for the page (it appears under the blue bar).
• Set the AM Definition property to.

Page 32 of 86
Hitachi Consulting, Hyderabad

Step 5. Create the Second Region (Main Content Region)

Create your second region under the page layout region by selecting the page
layout region in the Structure window and choosing New > Region from the
context menu.
This region is merely going to provide a container for your items and ensure that
the items are properly indented. Set the following properties for your second
region:
• Replace the default value in the ID property with MainRN.
• Set the Region Style property to messageComponentLayout (this provides
an indented single- or multiple-column layout for the child items of the
region).

Page 33 of 86
Hitachi Consulting, Hyderabad

Step 6. Create the First Item (Empty Field)

Page 34 of 86
Hitachi Consulting, Hyderabad

Create your first item under the second region (main content region) by selecting
the second region in the Structure window and choosing New > messageTextInput
from the context menu.
• Set the following properties for your item:
• Set the ID property to HelloName.
• Verify that your Item Style property is set to messageTextInput (this style
provides a text label and an input field).
• Set the Prompt property to Name (in the later labs, you will use an attribute
set to set the prompt).
• Set the Length to 20.
• Set the Maximum Length to 50.
If you want to, you can run your page at this point.

Page 35 of 86
Hitachi Consulting, Hyderabad

Step 7. Create a Container Region for the Go Button


To add a non-message*-type bean such as a submitButton to a
messageComponentLayout region, you must first add the bean to a
messageLayout region.
Select the messageComponentLayout region and select New > messageLayout.

Page 36 of 86
Hitachi Consulting, Hyderabad

Name this region Button Layout.

Page 37 of 86
Hitachi Consulting, Hyderabad

Step 8. Create the Second Item (Go Button)

Create your Go button item by selecting the messageLayout region, ButtonLayout,


in the Structure window and choosing New > Item from the context menu.
Set the following properties for your button item:
• Set the value of the ID property to Go.
• Set the Item Style property to submitButton.
• Set the Attribute Set property to /oracle/apps/fnd/attributesets/Buttons/Go.
Note that you can search for this attribute set, even though the attribute set file is
not part of your project, by choosing the Search in: Entire MDS XML path option
but not selecting the Show
Components in Same Scope Only check box. You can use
/oracle/apps/fnd/attributesets/ and Go% as criteria for your search.

Page 38 of 86
Hitachi Consulting, Hyderabad

Verify that the Prompt property is now set to Go (this is your button label,
inherited from the attribute set). If you want to, you can run your page at this point.

Step 9. Save Your Work

Save your work. Using the menu choice File > Save All will save your metadata
changes to an XML file as well as save all your other file changes (such as to a .jsp
or .java file).

Page 39 of 86
Hitachi Consulting, Hyderabad

Tip: Though it usually will not be written out as a separate step in the exercises,
you should save your work frequently.

Step 10. Run Your Page Using the Run Option

You can try out your page using the Run option on the context menu.
If you are using a database other than what you already have in your project
settings, you will need to modify the Runtime Connection project settings by
selection your project file and choosing Project Settings ... from the main menu.
Specifically, you must use a combination of Username, Password, (Responsibility)
Application Short Name and Responsibility Key that is valid for you database to
enable your session to log in.

Page 40 of 86
Hitachi Consulting, Hyderabad

You can use the Run option in the context menu to test your page in a standard
browser. This option allows you to test your layout as well as functionality such as
handling button presses. Select your page or page layout region in the Structure
window, and choose Run from the context menu. Alternatively, you can select
your page in the Navigator window, and choose Run <page name> from the
context menu.

Page 41 of 86
Hitachi Consulting, Hyderabad

You may have to wait a few minutes or more before you see your page in a
separate browser window (it often takes longer the first time).
If your page does not appear after a few minutes, or gives errors, check the
messages in the Log window. See the Hello, World! Troubleshooting Guide or the
Oracle9i JDeveloper OA Extension FAQ. Your page should look like the
following picture (with your own name in the page header and window title). You
should see your page header, your Name field, and your Go button, along with
global links and buttons (some global buttons may not appear depending on profile
option settings). You may or may not see a Personalize Region link below your
page header, depending on profile option settings. Do not personalize this page, as
personalizations are data driven and you will affect anyone else building the Hello
World page on the same
database.

Page 42 of 86
Hitachi Consulting, Hyderabad

Each time you make changes to your layout (by adding regions or items,
modifying properties, or changing code), you must run your page again to see your
changes. If the Run process seems to hang for several minutes after you have
already run your page previously, you may need to terminate the OC4J server
using the Run > Terminate > Embedded OC4J Server main menu option, and then
run again.

Step 11. Add a Controller


Add a controller to display a message when the user clicks on the Go button. Select
your second region (MainRN) and choose Set New Controller... from the context
menu.

Page 43 of 86
Hitachi Consulting, Hyderabad

Give your controller the package name


xxhitachi.oracle.apps.po.xxhelloworld.webui and an appropriate class name,
such as xxHelloWorldCO, and click OK.

Step 12. Edit Your Controller


Edit your controller code as follows:

Page 44 of 86
Hitachi Consulting, Hyderabad

Add the following line as the last line of the import section to make the OA
Framework OAException routines available:
import oracle.apps.fnd.framework.OAException;

Note that you can sort your imports using the context menu in the code editor
(Organize Imports > Sort Imports) as shown in the following picture:

Code the processFormRequest() method to match the following (making sure to


match the item IDs you chose):

public void processFormRequest(OAPageContext pageContext, OAWebBean


webBean)
{
super.processFormRequest(pageContext, webBean);
if (pageContext.getParameter("Go") != null)
{
String userContent = pageContext.getParameter("HelloName");
String message = "Hello, " + userContent + "!";

Page 45 of 86
Hitachi Consulting, Hyderabad

throw new OAException(message, OAException.INFORMATION);


}
}
}
Note that hardcoding a message text string is not translatable and would not be
acceptable in a real Oracle Applications product. Normally you would define your
message in Message Dictionary and call it from your code using its message name
using the OAException routine.

Page 46 of 86
Hitachi Consulting, Hyderabad

Step 13. Build Your Controller


Build your controller by selecting Rebuild from the context menu within the code
editor window.

Page 47 of 86
Hitachi Consulting, Hyderabad

Step 14. Test Your Work Using the Run Option

Save your work, then test it using the Run option. Type something into your field
and then click the Go button.You should see the your page with an informational
message that contains what you typed into the field, as shown:

Page 48 of 86
Hitachi Consulting, Hyderabad

Display User Name and Responsibility Name on the page

Lab Goals

Create a page include two items one for User Name and Responsibility
Name
Item style as message style text.
Create the controller.
Display the username and responsibility name while loading the page, so
select process request.
Get the username and responsibility name from page context.
Initialize message style text item and import the same.
Validate the two fields and assign the same to the fields.

Task1: Create the workspace and Project

Page 49 of 86
Hitachi Consulting, Hyderabad

Task2: Create the Page

Page 50 of 86
Hitachi Consulting, Hyderabad

Task3: Create the AM and attach AM to the page.

Page 51 of 86
Hitachi Consulting, Hyderabad

Task4: Create 2 items style as message style text.

Page 52 of 86
Hitachi Consulting, Hyderabad

Task5: Create the controller and validate.

Page 53 of 86
Hitachi Consulting, Hyderabad

Code in controller

String username=pageContext.getUserName();

OAMessageStyledTextBean
mstuser=(OAMessageStyledTextBean)webBean.findIndexedChildRecursive("User
Name");

mstuser.setValue(pageContext,username);

String Resname=pageContext.getResponsibilityName();

OAMessageStyledTextBean
mstres=(OAMessageStyledTextBean)webBean.findIndexedChildRecursive("Resp
onsibilityName");

mstres.setValue(pageContext,Resname);

Page 54 of 86
Hitachi Consulting, Hyderabad

Task6: Run the page and below is the output.

Validation Between two fields

Lab Goals

Create the page include two fields and one button


Two fields Item style as message text input.
Create the controller.
Capture the value from first field and swap into the second field when you
click the button, so select process form request.
Get the First value from the page context.
Initialize message text input.
Validate the field and assign to second field by using set method.

Page 55 of 86
Hitachi Consulting, Hyderabad

. Task1: Create the workspace and Project

Page 56 of 86
Hitachi Consulting, Hyderabad

Task2: Create the page

Page 57 of 86
Hitachi Consulting, Hyderabad

Task3: Create the Application Module(AM)

Task 4:Attach AM to the page.

Page 58 of 86
Hitachi Consulting, Hyderabad

Task 5: Create the two fields and Go button.

Task6: Create the Controller and validating the fields.

Page 59 of 86
Hitachi Consulting, Hyderabad

Select the process form request and code should be below.

public void processFormRequest(OAPageContext pageContext, OAWebBean


webBean)

super.processFormRequest(pageContext, webBean);

if(pageContext.getParameter("Go")!=null)

String firstname=pageContext.getParameter("FirstName");

OAMessageTextInputBean
mti=(OAMessageTextInputBean)webBean.findChildRecursive("SecondName");

mti.setValue(pageContext,firstname);

Page 60 of 86
Hitachi Consulting, Hyderabad

Result:

1) Enter the value in first field

2)Press the go button to see below output

Page 61 of 86
Hitachi Consulting, Hyderabad

Building Search Page

Search Lab Goals

After completing this exercise, you should have learned how to:
Create a typical search page including an OAQueryBean search region and a
results table.
Enable "selective search criteria" to prevent blind queries.
Create a List of Values (LOV).
Create a root UI application module and enable passivation.
Create a BC4J package.
Create a plain SQL view object.

For this exercise, you'll be implementing a simple search and results page.

Page 62 of 86
Hitachi Consulting, Hyderabad

Task 1: Create Workspace and Project

Page 63 of 86
Hitachi Consulting, Hyderabad

Task 2: Create The Page.

Task3: Create AM and VO Attach VO to the AM.

Page 64 of 86
Hitachi Consulting, Hyderabad

Step 3.1 Create Your Root UI Application Module (AM)


Create a new Application Module (AM) to be used as the root UI application
module for your page.

Select the xxhitachi.oracle.apps.apo.employeesearch.server BC4J


package in the Navigator, right-click and select New Application Module...
from the context menu to open the Application Module (AM) wizard.
If the Welcome page appears, select Next.
In the Name page, specify EmployeeSearchAM as the AM name and verify
that the Package is xxhitachi.oracle.apps.apo.employeesearch.server.
Click the Next button until you get to Step 4 of 4.
In the Java page, select the Generate Java File(s) checkbox.
Select the Finish button to create the AM.

Page 65 of 86
Hitachi Consulting, Hyderabad

Step 3.2 Enable Passivation for the Root UI Application Module

Passivation should be enabled for all root UI application modules.

Note that passivation is not fully supported in release 11.5.10 production; this is
included for preview purposes.

Note: When you are ready to build your own applications, you can learn more
about passivation in the OA Framework Developer's Guide advanced topic OA
Framework State Persistence Model (Passivation). The related Model Coding
Standard M8 has an important note stating that the RETENTION_LEVEL
property described below should not be set to MANAGE_STATE unless you are
ready to fully implement and certify your page for passivation support.

Select the EmployeeAM application module in the Navigator, right-click


and select Edit EmployeeAM... from the context menu.
In the Application Module Editor, navigate to the Properties page.
In the Name field enter RETENTION_LEVEL.
In the Value field enter MANAGE_STATE.
Page 66 of 86
Hitachi Consulting, Hyderabad

Warning: you must match the case and spelling exactly as shown.
Select the Add button.
Select the Apply button.
Select the OK button to close the Application Module Editor window.

Step 2.6 Create an Employee Entity Object (EO)

Create an entity object (EO) for the Per_ALL_People_f table in the OA


Framework

Tip: Most of the BC4J wizards allow you to resize the wizard window, even
though there may not be visible resize controls. This is helpful for viewing long
values and SQL statements.

Select the xxhitachi.oracle.apps.apo.employeesearch.schema.server BC4J


package in the Navigator, right-click and select New Entity Object... from
the context menu to open the Entity Object wizard.
If the Welcome page appears, select Next.
In the Name page: Enter EmployeeEO in the Name field. Verify that
the Package is xxhitachi.oracle.apps.apo.employeesearch.schema.server.
In the Schema Object field, enter Per_ALL_PEOPLE_F. You must type
this name correctly. Otherwise, you can check the Synonyms check box (so
both Tables and Synonyms are checked) and choose the correct name from a
very long list.
Select the Next button twice to navigate to the Attribute Settings page (note
that all the table's columns are automatically included as attributes, which
complies with the OA Framework Model Coding Standards for Entity
Objects.
Verify that the PersonId attribute's Primary Key check box is selected. Do
not change any other default settings.
Select the Next button.
In the Java page, select the Generate Java File check box for the Entity
Object Class: EmployeeEOImpl (you will add business logic to this Java file
in a later exercise).

Page 67 of 86
Hitachi Consulting, Hyderabad

In the Generate Methods region, check the Accessors, Create Method,


Validation Method and Remove Method check boxes.
Select the Next button.
In the Generate page, deselect the Generate Default View Object check box
(or, verify that it is not selected).
Select the Finish button to create your EO.
Select your EO, right-click and select Edit EmployeeEO...
Select the Tuning tab. Check the Use Update Batching checkbox and set the
Threshold field value to 100.

Page 68 of 86
Hitachi Consulting, Hyderabad

Step 2.8 Create an EmployeeSearchVO

Select the xxhitachi.oracle.apps.apo.employeesearch.server BC4J


package in the Navigator, right-click and select New View Object... from the
context menu to open the View Object wizard.
If the Welcome page appears, select Next.
In the Name page, specify EmployeeSearchVO as the view object's name
and verify that the Package is
xxhitachi.oracle.apps.apo.employeesearch.server
Select the Next button.
In the Entity Objects page, select the EmployeeEO in the Available list and
shuttle it to the Selected list twice (once for the employee, and once for the
employee's manager).
Select the Next button and select appropriate attribute from EO for display
data.

Page 69 of 86
Hitachi Consulting, Hyderabad

Step 2.9 Add Your View Object to the Root UI Application Module
View objects can be used only within the context of a containing application
module. Before you can use the EmployeeSearchVO in your page, you must add
it to the page's root UI Application Module.

Select the EmployeeAM in the Navigator pane, right-click and select Edit
EmployeeAM... from the context menu to open the Application Module
Editor.
Navigate to the Data Model page.
Select the EmployeeSearchVO view object in the Available View Objects
list and shuttle it to the Data Model list.

Tip: Take careful note of the default View Instance name that BC4J creates when
you add your VO to the selected AM (BC4J creates this name by appending a "1"
to your VO name). Leave it or change it, your choice (we suggest leaving the
default value as is). In either case, know what the value is before creating your
Results table region in the next task.

Select the OK button to finish adding your VO to your root AM.

Page 70 of 86
Hitachi Consulting, Hyderabad

Task 3: Create Your Initial Page


For this task, you will build and run a page with just the Employees Search
Page.

Task 4: Configure a Results-Based Search


In this section, you'll create a simple "results-based" search by leveraging the OA
Framework query region.

You'll see how to enable the user-personalizable Views panel, the Simple Search
panel, and the Advanced Search panel without explicitly creating the UIs for these
regions. In the next task, you will change from a "results-based" search to an "auto
customization criteria" search so you can take a bit more control of the UI that
displays in the Search region.

Page 71 of 86
Hitachi Consulting, Hyderabad

Step 4.1 Add a Query Bean to Your Page


Add the query bean region to your page.
Select the PageLayoutRN in the Structure pane, right-click and select New
> Region from the context menu.
Select the new region (region1), and set/verify its properties as follows:

Property Value
ID QueryRN
Region Style query
Construction Mode resultsBasedSearch
Include Simple Panel True

Page 72 of 86
Hitachi Consulting, Hyderabad

Include Views Panel True


Include Advanced Panel True

Step 4.2 Add a Results Data Table to Your QueryRN


Select the QueryRN in the Structure pane, right-click and select New >
Region Using Wizard from the context menu.
If the Welcome page appears, select Next.
In the BC4J Objects page, select your EmployeeAM
xxhitachi.oracle.apps.apo.employeesearch.server.EmployeeAM), and
then select your EmployeeSearchVO1 view object instance from the
Available View Objects list.
DO NOT select the Use this as Application Module Definition for this
region checkbox.
Select the Next button.
In the Region Properties page, set the Region ID field value to ResultsTable
and set the Region Style to table.
Select the Next button.
In the View Attributes page, select the following attributes from the
Available View Attributes list and shuttle them to the Selected View
Attributes list:
EmployeeId
EmployeeName
Email

Select the Next button.


In the Region Items page, set the ID, Style, and Attribute Set properties as
follows. You may need to double-click on fields to edit their values. Note
that the Prompt value is set for you as soon as you apply the Attribute Set, so
do the attribute sets first and then verify that the prompts are correct.
ID Prompt Style Data Type Attribute Set *
EmpNum Number messageStyledText NUMBER /< base path
>/EmployeeId_Number

EmpName Name messageStyledText VARCHAR2 /< base path


>/FullName
Page 73 of 86
Hitachi Consulting, Hyderabad

Step 4.3 Set or Verify Your ResultsTable Region Properties


Select the ResultsTable region in the Structure pane, and set/verify the
following properties:

Property Value
ID ResultsTable

Region Style table


AM Definition Make absolutely sure that you have not
inadvertently associated an
application module here. If you have,
please delete it.

Additional Text Employees Table

Rendered True
Records Displayed 10
Width 100%

Step 4.4 Set or Verify EmpNum Item Properties


Configure this item to support sorting in the table, to be included in the "results-
based" search region that the OA Framework automatically creates, and to be a
selectively required search value (for performance reasons, blind queries are
disallowed in Oracle Applications unless the underlying view object has been
tuned to include a performant query so no additional search criteria is required).

For the EmpNum item:


Set the Search Allowed property to True to enable sorting on this table
column.
Set the Sort Allowed property to ascending
Set the Initial Sort Sequence property to first.
Set the Selective Search Criteria property to True.
Set the User Personalization property to True (needed so the user can save a
Personalized View).

Page 74 of 86
Hitachi Consulting, Hyderabad

Step 4.5 Set or Verify EmpName Item Properties


For the EmpName item:
Set the Search Allowed property to True.
Set the Selective Search Criteria property to True.
Set the User Personalization property to True (needed so the user can save a
Personalized View).

Step 4.6 Set or Verify Email Item Properties


For the Email item:
Set the Search Allowed property to True.
Set the User Personalization property to True (needed so the user can
save a Personalized View).

Step 4.8 Test Your Work


Test your work. Your results should appear below. Try selecting the Advanced
Search button, and the Save Search button after executing a query. Also try
selecting the Go button without specifying any search criteria. Try selecting the
Views button and saving a personalized search. Try using your saved search.

Note that you don't have to implement the query; the OA Framework implements
this for you automatically based on the table items that you identified with the
Search Allowed property. Furthermore, the OA Framework creates a Search UI
based on the data and item types of the Search Allowed items.

Page 75 of 86
Hitachi Consulting, Hyderabad

Task 5: Convert Your Search Region to Use Auto Customization


Criteria
Because we want to add an LOV with our search region, we cannot just use the
simple "results-based" search because it generates search items automatically
based on the columns in your results table. So, we need to convert our query bean
to run in "auto customization criteria mode" (that is, we want to customize our
search criteria by adding an LOV). The finished region should appear as shown in
below (the LOV icon appears after you finish Task 6).

Page 76 of 86
Hitachi Consulting, Hyderabad

Step 5.1 Change the Query Bean to Use autoCustomizationCriteria


Select the QueryRN in the Structure pane.
Change its Construction Mode property to autoCustomizationCriteria.
Change its Include Views Panel property to False.
Change its Include Advanced Panel property to False.

Step 5.2 Add a Simple Search Region


Select the QueryRN in the Structure pane, right-click and choose New >
simpleSearchPanel from the context menu (remember this is a named child
of the query region). A header region (region2) and a
messageComponentLayout region (region1) will be created automatically.
Select the header region, set its ID to SimpleSearchHdr and change the
default Text property value to Search.
Select the default messageComponentLayout region created under the
simpleSearchPanel folder (region1) and set its ID to CustomSimpleSearch.

Page 77 of 86
Hitachi Consulting, Hyderabad

Step 5.3 Create an Employee Name Search Item


Select CustomSimpleSearch region in the Structure pane, right-click and select
New > messageTextInput from the context menu.

Select this item, and set or verify its properties as follows (note that some
properties are set by the attribute set, so you should specify this first):
Property Value
ID SearchEmpName
Item Style messageTextInput(you will change this
to an LOV field a bit later
Selective Search Criteria True
Data Type VARCHAR2
Maximum Length 240
CSS Class OraFieldText
Length 40

Step 5.4 Create an Employee Number Search Item


Select the CustomSimpleSearch region in the Structure pane, right-click
and select New > messageTextInput from the context menu.
Select this item, and change or verify its properties as follows:

Property Value
ID SearchEmpNum
Item Style messageTextInput
Selective TRUE
Search
Criteria
DataType NUMBER
Maximum 15
Length
Prompt Employee Number
CSS Class OraFieldText
Length 15

Page 78 of 86
Hitachi Consulting, Hyderabad

Step 5.5 Create Search Mappings Between Your Name / Number Items and
the ResultsTable
The OA Framework uses the mappings that you define between your custom
search items and columns in the ResultsTable to automatically handle the query
when the user selects the Go button.

Select the query bean or the query Components folder in the Structure pane,
right-click and choose New > simpleSearchMappings from the context
menu.
Select the default mapping created under the simpleSearchMappings and set
its properties to the following:

Property Value
ID EmpNameMap
Search Item SearchEmpName
Results Item EmpName

Select the simpleSearchMappings folder in the Structure pane, right-click nd


choose New > queryCriteriaMap from the context menu.
Select the new mapping and set its properties as follows:

Property Value
ID EmpNumMap
Search Item SearchEmpNum
Results Item EmpNum

Page 79 of 86
Hitachi Consulting, Hyderabad

Task 6: Add a List of Values (LOV) to Your Employee Name Field


In this section, you'll create a reusable list of values (LOV) that you will then
configure for use in the Search page (you'll use this same LOV later in the Create
page). The finished LOV should appear in below.

Step 6.1 Create the BC4J Package for Your LOV-Related Model Objects
All LOV view objects should be created in a common product package.

Select the EmployeeSearch.jpr project in the Navigator, right-click and


select New Business Components Package...to open the Business
Components Package Wizard.
If the Welcome page appears, select the Next button.
In the Package Name page, enter xx hitachi.oracle.apps.po.lov.server.
Verify that the radio button Entity Objects mapped to database schema
objects is selected.
Click the Finish button to create the LOV BC4J package.

Step 6.2 Create a Common LOV Application Module


Related LOV view objects should be grouped into a common application module.
For example, any LOV view objects that you create for the Employees application
should be included in one application module.

Page 80 of 86
Hitachi Consulting, Hyderabad

Select the xxhitachi.oracle.apps.po.lov.server BC4J package in the


Navigator, right-click and select New Application Module... from the
context menu to open the Application Module (AM) wizard.
If the Welcome page appears, select Next.
In the Name page, specify EmployeeLOVAM as the AM name and verify
that the Package is xxhitachi.oracle.apps.po.lov.server.
Click the Next button until you get to Step 4 of 4.
In the Java page, deselect the Generate Java File(s) checkbox (you won't be
adding any code to this application module).
Select the Finish button to create the AM.

Step 6.3 Create the LOV View Object


Select the xxhitachi.oracle.apps.po.lov.server package in the Navigator,
right-click and select "New View Object..." from the context menu to open
the View Object wizard.
If the Welcome page appears, select Next.
In the Name page, specify EmployeeNamesVO as the view object name
and verify that the Package is xxhitachi.oracle.apps.po.lov.server.
Select the Next button until you get to the Query page.
In the Query page, enter the following query into the Query Statement text
field (note that this LOV is querying "active" employees, and for the sake of
simplicity, the business rule assumes that the presence of any end_date --
regardless of what this date is relative to sysdate -- indicates that the
employee is inactive). Select the Test button to ensure your syntax is
correct.
SELECT full_name AS EMPLOYEE_NAME from PER_ALL_PEOPLE_F

Select the Next button until you get to the Java page.
In the Java page, deselect the Generate Java File for View Object Class:
EmployeeNamesVOImpl (you don't need to add any code to this view
object). Do select the Generate Java File for View Row Class:

Page 81 of 86
Hitachi Consulting, Hyderabad

EmployeeNamesVORowImpl to comply with OA Framework coding


standards.
Select the Finish button to create your VO.

Step 6.4 Add the EmployeeNamesVO to the LabsLovAM


View objects can be used only within the context of a containing application
module. Before you can use the EmployeeNamesVO in your LOV, you must add
it to the LOV application module.

Select the EmployeeLovAM in the Navigator pane, right-click and select


Edit EmployeeLabsLovAM... from the context menu to open the
Application Module Editor.
Navigate to the Data Model page.
Select the EmployeeNamesVO view object in the Available View Objects
list and shuttle it to the Data Model list.
Select the OK button to finish adding this VO to the AM.

Step 6.5 Create the Shared EmployeesLovRN LOV Region


Since the Employee Names LOV can be used in many different pages, it
must be created as a shared, standalone region.
Select the EmployeeSearch.jpr project in the Navigator, right-click and
select New... from the context menu.
In the New window, expand the Web Tier hierarchy and select OA
Components.
Select Region in the OA Components Items list.
Select the OK button to continue.
In the New Region dialog, specify the following values:
In the Name field enter EmployeesLovRN.
In the Package field enter xxhitachi.oracle.apps.po.lov.webui.
In the Style field select listOfValues.

Page 82 of 86
Hitachi Consulting, Hyderabad

Click the OK button to create your region.


Select the EmployeesLovRN in the Structure pane, set the AM Definition
property to xxhitachi.oracle.apps.po.lov.server.EmployeeLovAM, set the
Advanced Search Allowed property toTrue and set the Scope property to
Public.

Step 6.6 Add a Table to Your LOV


Select the EmployeesLovRN in the Structure pane, right-click and select
New > table Using Wizard from the context menu.
If the Welcome page appears, select Next.
In the BC4J Objects page, select your EmployeesLovAM

xxhitachi.oracle.apps.po.lov.server.EmployeeLovAM, and then select your


EmployeeNamesVO1 view object instance from the Available View Objects list.

DO NOT select the Use this as Application Module Definition for this region
checkbox.

Select the Next button.


In the Region Properties page, set the Region ID field value to
EmpNamesTable and set the Region Style to table.
Select the Next button.
In the View Attributes page, add all the attributes in the
EmployeeNamesVO1.
Select the Next button.
In the Region Items page, set the ID, Style, and Attribute Set properties as
follows (note that the Prompt value is set for you as soon as you apply the
Attribute Set, so do the attribute sets before the prompts and then verify that
the prompts are correct).
ID Prompt Style Data Type Attribute Set
*
EmpName Employe messageStyledTe VARCHAR base path
e Name xt 2 >/FullName
EmailAddres Email messageStyledTe VARCHAR /< base path
s Address xt 2 >/EmailAddres
s
Page 83 of 86
Hitachi Consulting, Hyderabad

Click the Finish button to create your data table.


Select the EmpName and EmpNum item in the Structure pane, and set their
Search Allowed and Selective Search Criteria properties to True. The first
property lets users search on these values in the LOV, and the second
property ensures that the users specify search criteria for at least one of these
values to avoid a blind query.

Step 6.7 Make the Employee Name Item an LOV


When you first created the Employee Name item, you set its style to
messageTextInput (a standard text entry field). Now, you need to configure it to
include an LOV.

Highlight the EmpSearchPG.xml. In the Structure window, select the


SearchEmpName item in the CustomSimpleSearch panel.
Change its Item Style property to messageLovInput.
When you set the Item Style property to messageLovInput, JDeveloper
automatically creates an inline
LOV region (region style listOfValues) and a default LOV mapping.
Set the External LOV property to
xxhitachi/oracle/apps/po/lov/webui/EmployeesLovRN.
Change its Disable Validation property to True. Note: Per the OA
Framework View Coding Standards, validation should always be enabled on
an LOV field unless the user should be able to enter partial values as is often
the case in a search crtieria field.

Note: When you change this property, JDeveloper displays a confirmation


message indicating that children of your base field, such as the inline LOV region,
will be removed by the change. Confirm the change (select the OK button). Once
you confirm, the inline LOV region is removed and the new external LOV region
appears in the hierarchy (grayed out because it cannot be edited directly in your
page).

Page 84 of 86
Hitachi Consulting, Hyderabad

Step 6.8 Define LOV Mappings


Create mappings between base page items and LOV items. The mappings identify
the data input/output relationships between base page items and LOV items.

Select the default LOV mapping, ID'ed as lovMap1, and set the following
properties:
Change the LOV Region Item property by selecting EmpName field from
the poplist.
Change the Return Item property by selecting SearchEmpName field from
the poplist.
Change the Criteria Item property by selecting SearchEmpName field from
the poplist.
Right-click lovMappings in the Structure panel, and select New > lovMap
from the context menu.
Select the default LOV mapping, ID'ed as lovMap2, and set the following
properties:

Step 6.9 Test Your Work


Test your work. Your base page (the Employees search page) should appear as
shown below.

Page 85 of 86
Hitachi Consulting, Hyderabad

Page 86 of 86

You might also like