OA Framework Tutorial

99
iSalesOrderDetails OAF Implementation Author: Sudhakar Jeedipalli

Transcript of OA Framework Tutorial

Page 1: OA Framework Tutorial

iSalesOrderDetailsOAF Implementation

Author: Sudhakar Jeedipalli

Page 2: OA Framework Tutorial

Task 1: Setup your environment for your OAF development

Create the new workspace

Page 3: OA Framework Tutorial

The Directory Name ...jdevhome\jdev\myprojects is default. So, you only need confirmthat it is set as expected.

Page 4: OA Framework Tutorial

Enter the File Name and Default Package as per the standards.

Page 5: OA Framework Tutorial
Page 6: OA Framework Tutorial

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.

Page 7: OA Framework Tutorial
Page 8: OA Framework Tutorial
Page 9: OA Framework Tutorial

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.

Page 10: OA Framework Tutorial
Page 11: OA Framework Tutorial
Page 12: OA Framework Tutorial

Click OK and then Save the Project

Page 13: OA Framework Tutorial
Page 14: OA Framework Tutorial

Create the Application Module (AM)

Page 15: OA Framework Tutorial
Page 16: OA Framework Tutorial

Currently you have not defined any View Objects (VOs); so, there are no VOs available to add tothe AM at this time. So, click Finish button and then Save the Project.

Page 17: OA Framework Tutorial

Within your newly created Application Module SalesOrderQueryAM two files will be generated they are,SalesOrderQueryAM.xml – the declarative (XML-based) components of the AMSalesOrderQueryAMImpl.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 Componentsserver.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."

Page 18: OA Framework Tutorial

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 AM’s BC4J package.

Page 19: OA Framework Tutorial
Page 20: OA Framework Tutorial
Page 21: OA Framework Tutorial
Page 22: OA Framework Tutorial
Page 23: OA Framework Tutorial

Enter the SQL query for serach items and test the query.

Page 24: OA Framework Tutorial

Click OK and then click Next > button

Page 25: OA Framework Tutorial
Page 26: OA Framework Tutorial

· 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.

Page 27: OA Framework Tutorial

Click the Finish button and then Save the Project

Page 28: OA Framework Tutorial
Page 29: OA Framework Tutorial

Add your VO to your AMAll VOs must be contained within an AM. In this exercise, your AM is SalesOrderQueryAM. You need to add the SalesOrderQueryVO to your SalesOrderQueryAM.

Page 30: OA Framework Tutorial

Select SalesOrderQueryVO from the Available View Objects pane, and shuttle it to the Data Modelpane. 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.

Page 31: OA Framework Tutorial

We need to setup as shown above in Properties category because while not critical at this point, itis part of enabling Passivation on an OA Framework Page. Once the setup is done click theApply and OK buttons respectively, finally save your work.

Note: All AMs should be set this way

Page 32: OA Framework Tutorial

Task 3: Create the View-layer ComponentsFirst you have to create the …webui BC4J package to hold the OA Page components.

Page 33: OA Framework Tutorial

Create your page (PG)

Page 34: OA Framework Tutorial
Page 35: OA Framework Tutorial

Make sure the Page is creating in ...webui Package

Page 36: OA Framework Tutorial
Page 37: OA Framework Tutorial
Page 38: OA Framework Tutorial
Page 39: OA Framework Tutorial
Page 40: OA Framework Tutorial

Create your Query RegionA 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.

Page 41: OA Framework Tutorial
Page 42: OA Framework Tutorial
Page 43: OA Framework Tutorial

Save your Project.

Page 44: OA Framework Tutorial

Create your Results Table Region

Page 45: OA Framework Tutorial
Page 46: OA Framework Tutorial
Page 47: OA Framework Tutorial
Page 48: OA Framework Tutorial

Change the Style property to messageStyledText for all the items.

Page 49: OA Framework Tutorial
Page 50: OA Framework Tutorial
Page 51: OA Framework Tutorial

Set the following properties:Search Allowed: TrueSelective Search Criteria: TrueUser 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

Page 52: OA Framework Tutorial

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

Page 53: OA Framework Tutorial

Set your project’s Run Options

Page 54: OA Framework Tutorial

Shuttle OADiagnostics from Available Options to Selected Options using the > button and saveyour work.

Page 55: OA Framework Tutorial

Rebuild the SalesOrderDetails.jws file and make sure the Workspace compiled with No errors.

Page 56: OA Framework Tutorial

Run the SalesOrderQueryPG.xml file, then it will automatically instantiate the Embedded OC4J Server to open the OA Page in the browser.

Page 57: OA Framework Tutorial
Page 58: OA Framework Tutorial

Enter the OrderNumber and then click the Go button. We can see the Order Details shown above

Page 59: OA Framework Tutorial

Task 4: Add a List of Values (LOV) to QueryA 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)

Page 60: OA Framework Tutorial

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).

Page 61: OA Framework Tutorial
Page 62: OA Framework Tutorial

Create your LOV View Object

Page 63: OA Framework Tutorial
Page 64: OA Framework Tutorial

Add your VO to your AMView 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.

Page 65: OA Framework Tutorial

Task 5: Create your View-layer components for the LOVFirst create the …lov.webui BC4J Package for holding the LOV Region

Page 66: OA Framework Tutorial

Create your LOV Region

Page 67: OA Framework Tutorial
Page 68: OA Framework Tutorial
Page 69: OA Framework Tutorial

Attach the sanmina.oracle.apps.xxsan.oe.lov.server.OrderNumLovAM to the AM Definition Property.

Page 70: OA Framework Tutorial

Change the Region Style Property to listOfValues and Advance Search Allowed Property to True

Page 71: OA Framework Tutorial

Change the Scope Property to Public

Page 72: OA Framework Tutorial

Add a table to your LOV

Page 73: OA Framework Tutorial
Page 74: OA Framework Tutorial
Page 75: OA Framework Tutorial
Page 76: OA Framework Tutorial
Page 77: OA Framework Tutorial
Page 78: OA Framework Tutorial
Page 79: OA Framework Tutorial
Page 80: OA Framework Tutorial

Add a Simple Search Region to your QueryRN

Page 81: OA Framework Tutorial
Page 82: OA Framework Tutorial
Page 83: OA Framework Tutorial

Create an OrderNumber Search Item for your Query

Page 84: OA Framework Tutorial
Page 85: OA Framework Tutorial
Page 86: OA Framework Tutorial

Set the CSS Class property to OraField Text

Page 87: OA Framework Tutorial

Create Search Mappings for your workOA 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.

Page 88: OA Framework Tutorial
Page 89: OA Framework Tutorial
Page 90: OA Framework Tutorial

Modify your Existing Page to use the LOVChange the Item Style Property of the SearchOrderNum to messageLovInput and then attach the Order Number LOV path to the External Lov Property.

Page 91: OA Framework Tutorial

Click Yes button

Page 92: OA Framework Tutorial
Page 93: OA Framework Tutorial

Define your LOV MappingsCreate 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 LOV’s query (Select).

Page 94: OA Framework Tutorial
Page 95: OA Framework Tutorial

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: TrueInclude Views Panel: TrueInclude Advanced Panel: TrueInitial Panel: simple

Page 96: OA Framework Tutorial

Change the Search Allowed and Selective Search Criteria properties of the OrderNumber to False.

Page 97: OA Framework Tutorial

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.

Page 98: OA Framework Tutorial

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.

Page 99: OA Framework Tutorial

After the Order Num is populated, Click the Go button to get the Order details shown below.