OAF: Its a JDeveloper tool which creates Oracle E-Business Suite HTML-based applications. We can create custom applications and also customize standard applications using this tool.
Architecture: OA Framework is based on the industry-standard J2EE MVC design pattern.
The Model maintains the state and data that the application represents . The accessibility of data/functions on data are defined here.
The View allows the display of information about the model to the user.
The Controller controls the user inputs (mouse/keyboard).
The Model maintains the state and data that the application represents . The accessibility of data/functions on data are defined here.
The View allows the display of information about the model to the user.
The Controller controls the user inputs (mouse/keyboard).
Workspace is a container which will have all the related projects.
Project is a container having all objects needed in our application.
Project is a container having all objects needed in our application.
MVC in OAF:
Model: bc4j (AM, VO, EO, AO, VL)
View: XML Controller: CO
View: XML Controller: CO
When we create files in OAF we should follow the following structures as per Oracle conventions.
oracle.apps.application.component.subcomponent.schema.server for EO
oracle.apps.application.component.subcomponent.server for VO, VL and AM
oracle.apps.application.component.subcomponent.poplist.server for VO populating dropdowns
oracle.apps.application.component.subcomponent.lov.server for VO populating LOV
oracle.apps.application.component.subcomponent.lov.webui for LOV Regions
oracle.apps.application.component.subcomponent.webui for page oracle.apps.application.component.subcomponent.server for EO, AO
oracle.apps.application.component.subcomponent.poplist.server for VO populating dropdowns
oracle.apps.application.component.subcomponent.lov.server for VO populating LOV
oracle.apps.application.component.subcomponent.lov.webui for LOV Regions
oracle.apps.application.component.subcomponent.webui for page oracle.apps.application.component.subcomponent.server for EO, AO
Steps to create an application using OAF:
Create Workspace and Project:
Create new OA workspace-Right click Workspaces > New OA Workspace(lets name it testSearch.jws)
Create new project-Right click testSearch.jws > New OA Project(lets name it testSearch.jpr)
Browse DBC file which should be present in secure folder and give apps username/password, application short name and Responsibility Key.
Finish the project wizard.
Create new BC4J for EO: Right Click testSearch.jpr > New business components package, lets name it oracle.apps.xxcmf.src.test.schema.server. Choose/Create database and finish.
Right click on schema.server package and Create a new EO, name it empTestEO. Choose some employee table as the schema object. Select the entity attributes.
If there is no primary key in the table then it will populate a pop up for ROWID as primary key. Click yes. Click finish.
Create new BC4J for VO: Similar way, create oracle.apps.xxcmf.src.test.server
Right click on server package and Create a new VO, name it empTestVO. Drag and Drop empTestEO to right side. Select columns which you want to display on page and shuffle them to right side. Click Finish.
Right click on server package and Create a new AM, name it empTestAM. Drag and Drop empTestVO to right side. Click Finish.
Create New Page: Create oracle.apps.xxcmf.src.webui
Right click on jpr New > web-tier > OA Components Page. Name the Page(say empTestPG) and select package.
When we create a page, Default page layout will be automatically created that is Default Region with style pageLayout. Click the pageLayout region, go to the component pallette and select AM in AM Definition from browse which you created for that page.window title a meaningful text(Say Test Search Screen).
Right click on pagelayout region and create a region and make style as advancedTable.Choose view instance for Table which will be referred to its child items.
Create items in advancedTable region by clicking on new column. Right click column and choose view attribute from list of values. Column Components > column Header > new SortableHeader. Give Prompt which will be your column name.
Likewise create all items which you want to display after pressing GO button.
Right click the page layout region and create controller(say testEmpCO).
In the processRequest, write the following..
——————-
oaapplicationmodule am = pagecontext.getapplicationmodule(webbean);
OAViewObject vo = (OAViewObject)am.findViewObject(“empTestVO “);
vo.executeQuery();
vo.executeQuery();
——————-
Test: Right click the page and run to test the page we just created.
ليست هناك تعليقات:
إرسال تعليق