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.
Step2:-Region1 has created.
ID=PageButtons
Change the Region Style for region1 is "pageButtonBar".
Right Click on PageButtons Region.Click New.Click Item
Step3:- item1 has created under "PageButtons" region.
Change the item1 Proeprty
ID=Save
Item Style=submitButton.
Write code under the Process Form Request Block under the contrller "RohitDataEntryCO"
Step1:- Right Click on "PageLayoutRN".Click New. Click Region.
Step2:-Region1 has created.
ID=PageButtons
Change the Region Style for region1 is "pageButtonBar".
Right Click on PageButtons Region.Click New.Click Item
Step3:- item1 has created under "PageButtons" region.
Change the item1 Proeprty
ID=Save
Item Style=submitButton.
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.
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