Sunday 31 March 2013

Update Page in OAF Framework

Update Page in OAF Framework

Hi friends, We are going to discuss about the Update page in OAF. We will share the detail steps with complete screenshot to develop the update page in OA framework. In this post ,We will try to updates record in OAF page.In the previous posts We have created a "Search Page" .We will start developing the  Update page in OAF page from this post.So please go through this post first then after creating Search page you should try to create the update page in OAF framework. We first need to extract the data from database in to OAF page and then we can perform the update operation in that Page. so that is the reason we are suggesting to first develop the search page and then start creating the update page in OA framework. .Please find below the complete detail about the Update Page in OAF.

Here below is the Post to develop the Search Page in OAF Framework

http://rpforacle.blogspot.com/2013/03/creating-search-page-in-oaf.html


Step by Step to Develop the Update Page in OAF Framework

Step 1:- 
As reference to the previous post creating "Creating Search Page In OAF" we will start update records in OAF page from here.

My  "Project" and "Workspace" is same as in "Creating Search Page in OAF".

First i will create a update page in the Project "RohitSearchPage".

Right Click on Project "RohitSearchPage".Click New.
Update Page in OAF Framework.
Update Page in OAF Framework.

Step 2:-


Update Page in OAF Framework.
Update Page in OAF Framework.

Step 3:-

Enter the Page Name="RohitUpdatePG"

Default Package="rohit.oracle.apps.fnd.RohitSearchPage.webui"

we create the page under the webui under the project directory

Click Ok Page has been created.
Update Page in OAF Framework.
Update Page in OAF Framework.

Step 4:-
 Update Page has created as below.
Update Page in OAF Framework.
Update Page in OAF Framework.
Step4:-

Click on Page "RohitUpdatePG" and Below in the Structure Page Click on "region1"
Repalce the ID of the "region1" with "PageLayoutRN" in the property inspector.
Then Again click on region  "PageLayoutRN" and then go to right hand side in property window set AM for this Region.
Set Properties for "PageLayoutRN".
AM Definition=rohit.oracle.apps.fnd.RohitSearchPage.server.RohitSearchPageAM.
Window Title=Rohit Tutorial
Title=Update Page.
We will attach the same AM of page "RohitSearchPage" to this page "RohitUpdatePG".
Update Page in OAF
Update Page in OAF
Step 5:-
Right Click on Region "PageLayoutRN"=>Click new=>Click Region.
Update Page in OAF
Update Page in OAF

Step 6:-

Then Region1 has created below "PageLayoutRN".
Click on this Region1 and go to the property window.
Set Properties for Region1
ID=MainRN
Region Style=messageComponentlayout.
Update Page in OAF
Update Page in OAF
Step 7:-

Now right Click on Region "MainRN".Click "messageTextinput".
Update Page in OAF
Update Page in OAF
Step 8:-

Then Item1 has created below Region "MainRN".
 Same like item1 created item2 under Region "MainRN".
Update Page in OAF
Update Page in OAF
Step 9:- 

Set Properties For Item1
 View Instance=SupplierVO
Item Style=messageTextInput.
View Attribute=SupplierId
Prompt=SupplierNo.

 Set Properties For Item2
 View Instance=SupplierVO
Item Style=messageTextInput.
View Attribute=SupplierName
Prompt=Supplier Name


Now Again Right Click on Region "PageLayoutRN"=>Click new=>Click Region.

Update Page in OAF
Update Page in OAF

Step 10:-

 Then Region1 has created Below "PageLayoutRN".
Click on Region1 and then Go to property Window.
Set Properties
ID=ButtonPage
Region Style=pageButtonBar.

Update Page in OAF
Update Page in OAF
Update Page in OAF
Update Page in OAF
Step 11:-

 Now Right Click on Region "ButtonPage".Click New=>Click Item.
Update Page in OAF Framework
Update Page in OAF Framework
Step 12:-
Then item3 has created under "ButtonPage".
Same Like this create "Item4" under "ButtonPage" region.
Set Properties for Item3
 Item Style=submitbutton.
Prompt=Update.

Set Properties for Item4
 Item Style=submitbutton.
Prompt=Cancel.
Update Page in OAF Framework
Update Page in OAF Framework
Step 13:-


Now We create a Controller For the page "RohitUpdatePG".

Under page "RohitUpdatePG". Right Click on Region "PageLayoutRN" =>Click "setnewController".
Update Page in OAF Framework
Update Page in OAF Framework
Step 14:-

Enter The Controller Name=RohitUpdatePageCO
Package=rohit.oracle.apps.fnd.RohitSearchPage.webui
Update Page in OAF Framework
Update Page in OAF Framework
Step 15:-

Then Controller has created as below
Update Page in OAF Framework
Update Page in OAF Framework


Step 16:-
 Now go to the page "RohitSearchPage".Select Page "RohitSearchPage".
Under Structure Window Right Click on "ResultsTable" under region "MainRN".=>Click New=>Click Item.
Update Page in OAF Framework
Update Page in OAF Framework


Step 17:-

Then item1 has created under "ResultsTable".
Click on Item1 and go to right hand side in Property window.
Id=Update
Item Style=image
Prompt=Update
Image URI=updateicon_enabled.gif
Action Type=fireAction.
Event=update_action
Update Page in OAF Framework
Update Page in OAF Framework


Step 18:-

Update Page in OAF Framework
Update Page in OAF Framework

Step 19:-

Put the code under the ProcessFormRequest in  Controller "RohitSearchPageCO"

    if ("update_action".equals(pageContext.getParameter(EVENT_PARAM)))
   
    {
      pageContext.setForwardURL("OA.jsp?page=/rohit/oracle/apps/fnd/RohitSearchPage/webui/RohitUpdatePG",
                                         null,
                                         OAWebBeanConstants.KEEP_MENU_CONTEXT,                            
                                         null,                                                   
                                         null,
                                         true,                            
                                         OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
                                         OAWebBeanConstants.IGNORE_MESSAGES);

    }




Put the code under the ProcessFormRequest in  Controller "RohitUpdatePageCO"



    OAApplicationModule am =
    (OAApplicationModule)pageContext.getApplicationModule(webBean);
   
   
    if(pageContext.getParameter("item3")!=null)
    {
      am.invokeMethod("apply");
     
     
    }
   
    if(pageContext.getParameter("item4")!=null)
    {
      am.invokeMethod("cancel");
     
     
    }
   


Step 20:-

After this Rebuild the Project "RohitSearchPage" and then run the page "RohitSearchPagePG".

Update Page in OAF
Update Page in OAF


Update Page in OAF

3 comments:

shaik shah said...

Goodblog, thanks for sharing this informative article. It would be helpful to all .your way of explaining in this good in this article.
Oracle Fusion HCM Online Training

yamuna said...
This comment has been removed by the author.
Anonymous said...

Good Blog.Thanks for sharing this information and helpful for me
Oracle Fusion Financials Online Training
Oracle Fusion Technical Online Training

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *