Search This Blog

Thursday, October 10, 2013

Creating Table Region in OA Page

1. Create a new Workspace with Name: TableDemo
2. Create a new Project with Name: TableDemo
Default Package:  xxapps.oracle.apps.fnd.tabledemo
3. Create a View Object:
3.1 Right click on TableDemo -> New -> Business Tier -> ADF Business Components -> View Object


3.2 Enter Package: xxapps.oracle.apps.fnd.tabledemo.server
Name: TableDemoVO
3.3 Click on next, next, next.
3.4  Query: SELECT * FROM XXHR_KPI_DEFINITIONS
3.5 Click on Next, Next, Next and then Finish.

4. Create an Application Module:
4.1 Right click on Project TableDemo, select New
BusinessTier -> ADF Business Components -> Application Module
4.2 Package: xxapps.oracle.apps.fnd.tabledemo.server
Name: TableDemoAM
4.3 Shuffle the View Object from TableDemoAM to right side.

4.4 Click on Next, Next and then Finish.

5. Create a Page.
5.1 Name: TableDemoPG
Package: xxapps.oracle.apps.fnd.tabledemo.webui
5.2 Select the region1 and set following properties:
ID: pageLayoutRN
       AM Definition: xxapps.oracle.apps.fnd.tabledemo.server.TableDemoAM
Window Title: Table Demo Page
       Title: Table Using Wizard Demo
5.3 Now right click on pageLayoutRN, Select New -> Region Using Wizard
5.4 Select the Application Module: 
Pacakge: xxapps. oracle.apps.fnd.tabledemo.server.TableDemoAM
       View Object: TableDemoVO1
5.5 Region ID: TableRN
   Regions Style: Table
5.6 Select required Attributes(attributes to be displayed in the page)
5.7 Click on next, next and then Finish.
6. Set New Controller
6.1 Right click on pageLayoutRN -> Set New OA Controller.
6.2  Package Name: xxapps.oracle.apps.fnd.tabledemo.webui
    Class Name: TableDemoCO
6.3 In controller class, write following code.
Import statements:
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.server.OAViewObjectImpl;
6.4 In ProcessRequest() method, write following code after super.processRequest():

OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
OAViewObjectImpl vo = (OAViewObjectImpl)am.findViewObject("TableDemoVO1"); 
vo.executeQuery();

7. Run the page TableDemoPG

No comments:

Post a Comment