How to Create oaf Page in Oracle Apps
5 Important OAF Objects needs to create OAF Page in Oracle Apps
Please find below the more detail information's of each OAF Page objects in Oracle Apps
- EO:- "Entity Object" : Encapsulate bushiness rules associated with a row in a table.Entity object has direct link with Data base table.Application interact with Database with the help of EO.
- VO:- "View Object" helps the application to deal with the EO. View Object may based on EO or it could be based on independent sql query which has no relation with the EO.
- AM:-"Application Module" is a container which provide or manage access to the BC4J model object.Application module has complete control on the Application page .An OAF page cannot be run without the Application module. And we cannot access any object in the Page with out the AM.
- CO:-"Controller" responds user action and maintain application flow. Controller contains two Blocks.we write our business logic in the controller.It helps to put validation and to meet out our businesses logic.
Process Request: When the page loads process request will fire. So if we want to initialize some default values when the page load put this under Process Request.
Process form Request: When we press the button, Process form request executed. So if we want to execute some code after user press the Submit button we will put under this block.
8 Key Activities to Create the OAF Page in Oracle Apps
Step by Step to create the OAF Page in Oracle Apps
Step 1:- We need to create the below table , based on that OAF page will be developed and data will be inserted into this table from the OAF Page.
How to Create oaf Page in Oracle Apps |
Step 2:- Now we will create the workspace to create OAF Page.
Create a new workspace name "RohitDataEntryOaf".
Right Click on "Applications".Click on "NewOAWorkspace".
Enter the name of Workspace="RohitDataEntryOaf".Click Ok.
How to Create oaf Page in Oracle Apps |
Step 3:- Now we need to create the Project to create the OAF page.
Project wizard will open click next.
Enter the name of the Project="RohitDataEntryOaf".
Default Package= "rohit.oracle.apps.fnd.RohitDataEntryOaf"
Package determines the directory where the java class files and other files related to this project strored.
In this directory oracle.apps.fnd must be required."fnd" is the oracle application shortname you can use other applications like "ak" in this.
How to Create oaf Page in Oracle Apps |
Enter the RunTime connection .Enter the E-business Suit Application User Name and Password.(already explained in the JDev installation).
How to Create oaf Page in Oracle Apps |
Step 4:- Now we need to create the Entity Object for OAF Page.
Workspace and project has been created.
If we have to insert data we have to use EO.
TO create Entity Object(EO).
Right Click on the project "RohitDataEntryOaf".Click New
How to Create oaf Page in Oracle Apps |
Step 5:-
Enter the Entity Object name="SupplierEntryEO"
Defualt Package="rohit.oracle.apps.fnd.RohitDataEntryOaf.server"
Schema Object = XX_SUPPLIER_MASTER //Your Table Name.
We create "Entity Object" under the "Server" directory of the project as OAF Standard.
Click Next.
How to Create oaf Page in Oracle Apps |
Click next and then finish.
How to Create oaf Page in Oracle Apps |
Step 6:-
EO has been create as below.
How to Create oaf Page in Oracle Apps |
Step 7:- Now we are creating a View Object(VO) Which is Based on Entity Object(EO).
Right Click on the project "RohitDataEntryOaf".Click New
How to Create oaf Page in Oracle Apps |
Step 8:-
Enter the View Object name="SupplierEntryVO"
Defualt Package="rohit.oracle.apps.fnd.RohitDataEntryOaf.server"
we create "View Object" under the "Server" directory of the project as OAF Standard.
Click Next.
How to Create oaf Page in Oracle Apps |
Step 9:- Now we are assigning the Entity Object created in the last step to View Object(VO).
Select the "SupplierEntryEO" in the left hand side and then shuttle this to the right and then click Next.
How to Create oaf Page in Oracle Apps |
Step 10:-
Click Next and then Finish.
How to Create oaf Page in Oracle Apps |
Step 11:-
View Object has created as below.
How to Create oaf Page in Oracle Apps |
Step 12:-
Now we create "Application Module".
Right Click on the project "RohitDataEntryOaf".Click New
How to Create oaf Page in Oracle Apps |
Step 13:- Now we are creating the Application Module to Create OAF Page
Application Module wizard has open as below click next
Enter the Application Module name="RohitDataEntryAM"
Defualt Package="rohit.oracle.apps.fnd.RohitDataEntryOaf.server"
we create "Application module" under the "Server" directory of the project as OAF Standard.
Click next and then finish.
How to Create oaf Page in Oracle Apps |
.Step 14:-
Select the "SupplierEntryVO" in the left hand side and then shuttle this to the right and then click next and then finish.
How to Create oaf Page in Oracle Apps |
Step 15:-
Application Module has created as Below.
How to Create oaf Page in Oracle Apps |
Right Click on the project "RohitDataEntryOaf".Click New
How to Create oaf Page in Oracle Apps |
Step 17:-
Enter the Page Name="RohitDataEntryPG"
Default Package="rohit.oracle.apps.fnd.RohitDataEntryOaf.webui"
we create the page under the webui under the project directory
Click Ok Page has been created.
How to Create oaf Page in Oracle Apps |
Step 18:-
Below in the Structure Page Click on "region1"
Repalce the ID of the "region1" with "PageLayoutRN" in the property inspector.
How to Create oaf Page in Oracle Apps |
Step 19:-
Click on the "PageLayoutRN".On the right hand side In the property inspector we will set the AM for the this page
AM Definition=rohit.oracle.apps.fnd.RohitDataEntryOaf.server.RohitDataEntryAM.
Right Click on the "PageLayoutRN" and then new and then click region.
How to Create oaf Page in Oracle Apps |
Step 20:-
Then region2 has created.
Replace the region2 ID with "MainRN" in the proeprty Inspector.
Change the Region Style=messageComponentLayout,
How to Create oaf Page in Oracle Apps |
Step 21:-
Right Click "MainRN".Click New and then Click 'messageTextInput'
How to Create oaf Page in Oracle Apps |
Step 22:-
Item1 has created.
Same as like this Create item2,item3,item4,item5,item5,item6.
Now set Values in the property inspector Window for item1.
ID=SupplierId
ViewInstance=SupplierEntryVO
ViewAttribute=SupplierId
Prompt=Supplier No.
How to Create oaf Page in Oracle Apps |
Step 23:-
Proeprty for item2.
ID=SupplierName
ViewInstance=SupplierEntryVO
ViewAttribute=SupplierName
Prompt=SupplierName
Proeprty for item3.
ID=SupplierAlias
ViewInstance=SupplierEntryVO
ViewAttribute=SupplierAliasName
Prompt=Supplier Alias Name
Proeprty for item4.
ID=SupplierCreationDate
ViewInstance=SupplierEntryVO
ViewAttribute=SupplierCreationDate
Prompt=Supplier Creation Date
Proeprty for item5.
ID=Adress1
ViewInstance=SupplierEntryVO
ViewAttribute=Address1
Prompt=Address1
Proeprty for item6.
ID=Adress2
ViewInstance=SupplierEntryVO
ViewAttribute=Address1
Prompt=Address2
How to Create oaf Page in Oracle Apps |
Step 24:-
Now we have to write the code for insert data so we need the Controller.
Create Controller.
Right Click on "PageLayoutRN".Click Set New Controller.
How to Create oaf Page in Oracle Apps |
Step 24:-
Enter The Controller Name=RohitDataEntryCO
Package=rohit.oracle.apps.fnd.RohitDataEntryOaf.lov
Put code in the Process Form Request Block as below
OAApplicationModule am=(OAApplicationModule)pageContext.getApplicationModule(WebBean).
am.invokeMethod("create_record");
How to Create oaf Page in Oracle Apps |
Step 25:-
Click on your Application Module "RohitDataEntryAM" then under Structure Window it shows the RohitDataEntryAMImpl.java
Create two methods under the RohitDataEntryAMImpl.java
1.
public void createrecord()
{
OAViewObject vo=(OAViewObject)getSupplierEntryVO();
if(!vo.isPreparedForExecution())
{
vo.executeQuery();
}
Row row=vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
}\\\
2.
public void saverecord()
{
getTransaction().commit();
}
Step 26:-
Right Click on "PageLayoutRN".Click New.Click Region.
How to Create oaf Page in Oracle Apps |
Step 27:-
Region1 has created.
ID=PageButtons
Change the Region Style for region1 is "pageButtonBar".
Right Click on PageButtons Region.Click New.Click Item
How to Create oaf Page in Oracle Apps |
Step 28:-
Item1 has created under "PageButtons" region.
Change the item1 Proeprty
ID=Save
Item Style=submitButton.
How to Create oaf Page in Oracle Apps |
Step 29:-
Write code under the Process Form Request Block under the contrller "RohitDataEntryCO"
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
OAApplicationModule oa=(OAApplicationModule)pageContext.getApplicationModule(webBean);
if(pageContext.getParameter("Save")!=null)
{
oa.invokeMethod("saverecord",null);
}
}
After this Right Click on the project "RohitDataEntryOaf" and then Click Rebuild.
Rebuild is the compilation of the project.
After successful compilation , Right Click on the page "RohitDataEntryPG".
Click Run.
How to Create oaf Page in Oracle Apps |
Step 30:-
How to Create oaf Page in Oracle Apps |
How to Create oaf Page in Oracle Apps |
1 comments:
Thank you for your articles that you have shared with us. Hopefully you can give the article a good benefit to us. What is Business Process Management
Post a Comment