You are on page 1of 4

Calling one page to Another page in OAF

Calling one page to Another page in OAF

Now we are going to learn how to call one page from another page.

For this first we have to create one workspace and one project.

Next create one AM.

Create two pages one for data display and another for data entry.

Attach the AM to both the pages.

Now here I am not creating the pages once again I am using my previous data display and data
entry page only.

Create the controller for each page.

Now when we click the create employee button it should redirect to data entry page.

For calling one page from another we have a method called pageContext.setForwardURL.

Write the following code in the processFormRequest of data display page controller( i.e in the
first page controller.)
/*For Copy pasting the code */

if(pageContext.getParameter("createEmployee")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/sangu/oracle/apps/po/DataDisplayPRJ/webui/
DataInsertPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}

"OA.jsp?page=/sangu/oracle/apps/po/DataDisplayPRJ/webui/DataInsertPG"

Complete path of the OAF page.

Null: - If we want to call oracle apps form 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.

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

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.
Null (parameter):- If we want to carry the values then we pass those values here.
True (Retain AM): generally this will be set to true value.

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

IGNORE_MESSAGES:- It will restrict the messages to not to carry from one page to another.

Run the page to see the output.

After clicking the Create Employee Button it will go to Data Entry page.
If u want go back to previous page then create one button in this page and write the code in this
page controller.

You might also like