• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Calling OAF Pages Using Update and Detail Image Icons

In the search page we have seen two images for each and every row result one is to Update the patient details with image icon     and another is for seeing the details and the image icon is   .

Now we need to validate the image items in the result and whenever we click on these image items it must take us to another page along with carrying the values too, so therefore we need to create SPEL for each image item and then we have to write the code in processFormRequest of search page controller.

SPEL value of Update icon: ${oa.SearchVO1.PatientId}

Parameter Name of Update Icon: pid

SPEL value of Detail Icon: ${oa.SearchVO1.PatientId}

Parameter Name of Detail icon: ppatientid


Write the following code in ProcessFormRequest of search page controller, continuing the previous code


……………………………………}elseif(“update”.equals(pageContext.getParameter(EVENT_PARAM))){  pageContext.setForwardURL(“OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StirlingUpdatePG”,                            null,                            OAWebBeanConstants.KEEP_MENU_CONTEXT,                            null,                            null,                            true,                            OAWebBeanConstants.ADD_BREAD_CRUMB_YES,                            OAWebBeanConstants.IGNORE_MESSAGES);}elseif(“detail”.equals(pageContext.getParameter(EVENT_PARAM))){  pageContext.setForwardURL(“OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG”,                           null,                           OAWebBeanConstants.KEEP_MENU_CONTEXT,                           null,                           null,                           true,                           OAWebBeanConstants.ADD_BREAD_CRUMB_YES,                           OAWebBeanConstants.IGNORE_MESSAGES);}


Now the entire code in the controller class of Search page looks like the following:


public void processFormRequest(OAPageContext pageContext, OAWebBean webBean){ super.processFormRequest(pageContext, webBean); StirlingAMImpl am= (StirlingAMImpl)pageContext.getApplicationModule(webBean); if(pageContext.getParameter(“item4”)!=null) {  am.xxSearchPatient(pageContext,webBean); } else if(pageContext.getParameter(“item6”)!=null) {  OAMessageTextInputBean mstb = (OAMessageTextInputBean)webBean.findChildRecursive(“item1”);  mstb.setValue(pageContext,null);  OAMessageTextInputBean mstb1 = (OAMessageTextInputBean)webBean.findChildRecursive(“item2”);  mstb1.setValue(pageContext,null);  OAMessageTextInputBean mstb2 = (OAMessageTextInputBean)webBean.findChildRecursive(“item3”);  mstb2.setValue(pageContext,null); } else if(pageContext.getParameter(“item8”)!=null) {  pageContext.setForwardURL(“OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG”,                            null,                            OAWebBeanConstants.KEEP_MENU_CONTEXT,                            null,                            null,                            true,                            OAWebBeanConstants.ADD_BREAD_CRUMB_YES,                            OAWebBeanConstants.IGNORE_MESSAGES);  }  else  if(“update”.equals(pageContext.getParameter(EVENT_PARAM)))  {   pageContext.setForwardURL(“OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StirlingUpdatePG”,                            null,                            OAWebBeanConstants.KEEP_MENU_CONTEXT,                            null,                            null,                            true,                            OAWebBeanConstants.ADD_BREAD_CRUMB_YES,                            OAWebBeanConstants.IGNORE_MESSAGES);  }  else  if(“detail”.equals(pageContext.getParameter(EVENT_PARAM)))  {   pageContext.setForwardURL(“OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG”,                            null,                            OAWebBeanConstants.KEEP_MENU_CONTEXT,                            null,                            null,                            true,                            OAWebBeanConstants.ADD_BREAD_CRUMB_YES,                            OAWebBeanConstants.IGNORE_MESSAGES);  }}


Calling One Form to Another Form

In this lesson we will see how to call one page from the current page in OAF. To create link between two pages we have “pageContext.serForwardURL”.

First create WorkSpace  and project.

Create AM, create page and attach AM to the page.

Here we are creating VO which displays employee information which are entered using the previous chapter page.

We know that to display data we need to create VO, attach VO to AM and then we need to execute the VO query whenever we click on the button, so there fore for that we need to write the code in the Process Form Request of Controller.

To know how to display data from the data base see the chapter called Displaying Data from DataBase.

Let us see  the parameter list in “pageContext.setForwardURL”.

example code is :

line1 :  pageContext.setForwardURL (DestinationPagePath,

line2: null,

line3 : menu_context,

line4 : null,

line5 : params(null),

line6 : RetainAM(true),

line7 : ADD_Bread_Crumbs,

line8 : Ignore_Messages);

In line1 :- Destination Page Path : Complete path of the OAF page.

line2:- null : If we want to call oracle apps form then then in first line Destination page path is null and here we will give the function name of the form. Line1 and Line2 are interlinked.

line3:- menu_context: We can include any number of menus as we require.

line4:- null: if we want only one particular menu then here we will specify that menu name and in line3 we need to pass null, line3 and line4 are interlinked.

line5: -params(null) : If we want to carry the values then we pass those values here.

line6:- RetainAM(true): generally this will be set to true value.

line7: -Add_Bread_Crumbs: If we want the link to carry to next page and store in the memory.

line8:-Ignore Messages: It will restrict the messages to not to carry from one page to another.

In this chapter we used displaying data of employees information which are entered in Data Entry page of previous lesson, if we want to see the employees information then we need to click on the button “Get Employee Information” and to create a new employee we need to click on “Create Employee” button.

The page structure of the Project what we are using now contains one main region and under it One Table Using Wizard Region, two submit buttons. The following figure shows the page structure:


If we run the page after creating VO and executing that VO whenever we click on the “Get Employee Information” then the output looks like the following:


If we observe in the output whenever we click on the Create Employee button it must take us to the Create Employee page which we created and seen in previous lesson.

Whenever we click on the Create Employee button then only it must take us to the Create Employee page so for that we need to write the code in the “processFormRequest”  of controller and the code in processFormRequest is:

if(pageContext.getParameter(“item3”)!=null){  pageContext.setForwardURL(“OA.jsp?page=/xxapples/oracle/apps/po/insertingrecords/webui/InsertDataPG”,                           null,                           OAWebBeanConstants.KEEP_MENU_CONTEXT,                           null,                           null,                           true,                           OAWebBeanConstants.ADD_BREAD_CRUMB_YES,                           OAWebBeanConstants.IGNORE_MESSAGES);}

In the program “item3″ is the id value of the Create Employee button. When we rebuild the code and run the page then the output looks like the following:


Now after clicking on the Create Employee button it leads us to Create Employee page:


“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Calling OAF Pages Using Update and Detail Image Icons"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.