You are on page 1of 99

iSalesOrderDetails

OAF Implementation

Author: Sudhakar Jeedipalli


Task 1: Setup your environment for your OAF development

Create the new workspace


The Directory Name ...jdevhome\jdev\myprojects is default. So, you only need confirm
that it is set as expected.
Enter the File Name and Default Package as per the standards.
Attach the DBC File Name of the particular database connection you are using for this project. Enter the
Application User Name, Password, Application Shrot Name and Responsibilty Key attached to your
application login.
Task 2: Create the Model-layer components

Create the BC4J Package for your Application Module (AM)


Every OA Framework page has to have a connection to the E-Business Suite database. The BC4J
component that holds the connection and transaction is called an Application Module (AM). Before creating
AM, you have to create the server BC4J package which will contain the both AMs as well as VOs only. So,
you have to create the AM within this package.
Click OK and then Save the Project
Create the Application Module (AM)
Currently you have not defined any View Objects (VOs); so, there are no VOs available to add to
the AM at this time. So, click Finish button and then Save the Project.
Within your newly created Application Module SalesOrderQueryAM two files will be generated they are,
SalesOrderQueryAM.xml the declarative (XML-based) components of the AM
SalesOrderQueryAMImpl.java the programmatic (Java-based) components of the AM

Within your newly created BC4J Package two more files will be generated they are,
bc4j.xcfg the XML configuration which lists all the BC4J Components
server.xml the declarative (XML-based) components of the server

NOTE:
While you only need an EO on an OA Framework page if that page is going to do an Insert, Update, or
Delete i.e., DML Operations. Before creating EO, you have to create the schema.server BC4J package
which will contain the EOs only. So, you have to create the EO within this package

" We are creating an EO in this excercise, because we are going to create a simple Search or Query
Page which don't require any DML operations."
Create your View Object (VO)
According to Oracle Applications Development standards and just good programming practice, your VO
should include only the attributes (columns) that are going to appear in the UI. So, you will create a VO,
linked to your previously created EO, which includes just a few of the columns from the table.

The VO and AM will share the same BC4J package. So, you have to create the VO within the AMs BC4J
package.
Enter the SQL query for serach items and test the query.
Click OK and then click Next > button
Deselect the SalesOrderQueryVOImpl: Generate Java File checkbox.
Select the SalesOrderQueryVORowImpl: Generate Java File and its Accessors checkboxes as
part of adhering to Oracle Applications Development standards that allow extensibility.
Click the Finish button and then Save the Project
Add your VO to your AM
All VOs must be contained within an AM. In this exercise, your AM is SalesOrderQueryAM. You need to
add the SalesOrderQueryVO to your SalesOrderQueryAM.
Select SalesOrderQueryVO from the Available View Objects pane, and shuttle it to the Data Model
pane. Notice that when shuttled, SalesOrderQueryVO becomes SalesOrderQueryVO1. This is expected
behavior. You are taking the VO from just a definition to a instance of that definition.
We need to setup as shown above in Properties category because while not critical at this point, it
is part of enabling Passivation on an OA Framework Page. Once the setup is done click the
Apply and OK buttons respectively, finally save your work.

Note: All AMs should be set this way


Task 3: Create the View-layer Components
First you have to create the webui BC4J package to hold the OA Page components.
Create your page (PG)
Make sure the Page is creating in ...webui Package
Create your Query Region
A very common process on OA Framework pages within the E-Business Suite is a Query page. This is so
common that a special UI object, the Query bean, has been created to handle task. A query bean consists of
two regions, the Query region and the Results table.
Save your Project.
Create your Results Table Region
Change the Style property to messageStyledText for all the items.
Set the following properties:
Search Allowed: True
Selective Search Criteria: True
User Personalization: True

In the same way select the remaining columns in the Structure panel, and using the Property Inspector, set
the following properties:
Search Allowed: True (If the column is a Search item)
Selective Search Criteria: True (If the column is a Search item)
User Personalization: True
You can change the Company logo (Here I have taken the SANMINA Logo) by setting Image URI property of
the corporateBrandingImage with the .gif image path as shown above.

Note: All the .gif images should be located in the path \jdevhome\jdev\myhtml\OA_MEDIA
Set your projects Run Options
Shuttle OADiagnostics from Available Options to Selected Options using the > button and save
your work.
Rebuild the SalesOrderDetails.jws file and make sure the Workspace compiled with No errors.
Run the SalesOrderQueryPG.xml file, then it will automatically instantiate the Embedded OC4J Server
to open the OA Page in the browser.
Enter the OrderNumber and then click the Go button. We can see the Order Details shown above
Task 4: Add a List of Values (LOV) to Query
A reusable, sharable LOV has both Model-layer and View-layer components.

First create the lov.server BC4J Package which hold the LOV Application Module (AM) and View Object
(VO)
Create your LOV Application Module (AM)
Related LOV View Objects (VO) should be grouped into a common Application Module (AM). For example,
any LOV View Objects that you create for the SalesOrder application should be included in one Application
Module (AM).
Create your LOV View Object
Add your VO to your AM
View Objects can be used only within the context of a containing application module. Before you can use the
OrderNumLovVO in your LOV, you must add it to the LOV Application Module OrderNumLovAM.
Task 5: Create your View-layer components for the LOV
First create the lov.webui BC4J Package for holding the LOV Region
Create your LOV Region
Attach the sanmina.oracle.apps.xxsan.oe.lov.server.OrderNumLovAM to the AM Definition
Property.
Change the Region Style Property to listOfValues and Advance Search Allowed Property to True
Change the Scope Property to Public
Add a table to your LOV
Add a Simple Search Region to your QueryRN
Create an OrderNumber Search Item for your Query
Set the CSS Class property to OraField Text
Create Search Mappings for your work
OA Framework uses the mappings that you define between your custom search items and columns in the
ResultsTableRN to automatically handle the query when the user selects the Go button.
Modify your Existing Page to use the LOV
Change the Item Style Property of the SearchOrderNum to messageLovInput and then attach the Order
Number LOV path to the External Lov Property.
Click Yes button
Define your LOV Mappings
Create mappings between base page items and LOV items. The mappings identify the data input/output
relationships between page items and LOV items.

Note: A Return Item is the attribute returned by the LOV. A Criteria Item is the attribute passed to the
attribute passed to the LOV, and is the basis for the LOVs query (Select).
Change the Construction Mode property of the QueryRN to autoCustomizationCriteria and make sure the
following properties are set in the following way.

Include Simple Panel: True


Include Views Panel: True
Include Advanced Panel: True
Initial Panel: simple
Change the Search Allowed and Selective Search Criteria properties of the OrderNumber to False.
Rebuild the Workspace and run the SalesOrderQueryPG.xml to see the modified OAF page with Torch
light option i.e., LOV at the Order Num field.

Click the Torch Light option.


Select the Order Number and then click the Quick Select option. Then that Order Number will copied to the
Order Num field in the main Page.
After the Order Num is populated, Click the Go button to get the Order details shown below.