Wednesday, 27 June 2018

Add button in oaf page

Add button in oaf page

We can add Button in the OAF page by two ways. One way , we can directly create the Button in the OAF page through J-Developer. In the J-developer , we can add the Item with type 'Submit Button' in the OAF page regions so this is the simple and easy to create or ADD the button in the OAF page. another way to add button in the OAF page , through Programming , in which we cannot add the button physically through J-Developer but we add the button by writing code in the OAF page controller and this code dynamically create the Button in the OAF Page. I will share the both of the two ways to add button in the OAF page.
 
Add button manually in the OAF page through J-Developer

Step1:- Right Click on "PageLayoutRN".Click New. Click Region.
Add button in oaf page

Step2:-Region1 has created.
ID=PageButtons
Change the Region Style for region1 is "pageButtonBar".

Right Click on PageButtons Region.Click New.Click Item

Add button in oaf page

Step3:- item1 has created under "PageButtons" region.
Change the item1 Proeprty
ID=Save
Item Style=submitButton.
Add button in oaf page


 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.

 
 
 

To Create Button Dynamically in OAF Page

You can follow this below post to know how we can create button dynamically in OAF Page.
 
 

0 comments:

Post a Comment

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

Name

Email *

Message *