The requirement here is to implement train functionality between three different pages. Each of these pages have Text Input Items.
This implementation has been illustrated using the following step by step procedure:
1.
Create a New OA Workspace and Empty OA Project
File>
New > General> Workspace Configured for Oracle Applications
File
Name -- TrainProj
Project
Name – TrainDemoProj
Default
Package -- xxcust.oracle.apps.fnd.traindemo
2.
Create an Application Module[ AM ]
TrainDemoProj right click > New > ADF Business
Components > Application Module
Name
-- TrainDemoAM
Package
-- xxcust.oracle.apps.fnd.traindemo.server
Check
Generate JavaFile(s)
Create
Three Pages TrainDemoPG1, TrainDemoPG2 and TrainDemoPG3 using the same way as mention below to
create TrainDemoPG1
3.
Create a OA components Pages
TrainDemoProj right click > New > OA Components
> Page
Name
– TrainDemoPG1
Package
-- xxcust.oracle.apps.fnd.traindemo.webui
4.
Modify the Page Layout (Top-level) Region
Attribute
|
Property
|
ID
|
PageLayoutRN
|
Region
Style
|
pageLayout
|
Form
Property
|
True
|
Auto
Footer
|
True
|
Window
Title
|
Train
Demo Window Title
|
Title
|
Train
Demo Page Header
|
AM
Definition
|
xxcust.oracle.apps.fnd.traindemo.server.TrainDemoAM
|
5.
Create the Second Region (Main Content Region)
Select
PageLayoutRN right click > New > Region
Attribute
|
Property
|
ID
|
MainRN
|
Region
Style
|
messageComponentLayout
|
Create Text Items for all three pages say
TextItemPage1, TextItemPage2 and TextItemPage3 in respective pages TrainDemoPG1, TrainDemoPG2 and TrainDemoPG3 in similar way of as
mention below to create TextItemPage1 in page TrainDemoPG1
6.
Create Text Items
Select
MainRN right click > New > messageTextInput
Prompt
– TextItemPage1
Length
-- 20
7.
Create a Standalone Train Region
TrainDemoProj
> New > Web Tier > OA Components > Region
Name
-- TrainRN
Package
– xxcust.oracle.apps.fnd.traindemo.webui
Style
– train
Select
TrainRN inStructure pane and open property inspector and set Allow Interaction property to True
8.
Add Three Train Nodes to TrainRN
Right
Click on TrainRN in Structure
pane > New > Link
Set
the link properties as follow --
ID
– TrainStep1
Item
Style – link
Text
– Step 1
Destination
URI – OA.jsp?page=/xxcust/oracle/apps/fnd/traindemo/webui/TrainDemoPG1
Right
Click on TrainRN in Structure
pane > New > Link
Set
the link properties as follow --
ID
– TrainStep2
Item
Style – link
Text
– Step 2
Destination
URI – OA.jsp?page=/xxcust/oracle/apps/fnd/traindemo/webui/TrainDemoPG2
Right
Click on TrainRN in Structure
pane > New > Link
Set
the link properties as follow --
ID
– TrainStep3
Item
Style – link
Text
– Step 3
Destination
URI – OA.jsp?page=/xxcust/oracle/apps/fnd/traindemo/webui/TrainDemoPG3
9.
Add Train Region to each of your Pages
For
each of three pages in multistep flow, right click the pageLayoutRN in structure panel, and select New > location from page Context menu
Set
following properties as follow --
ID
– TrainDemoRN
Extends
-- /xxcust/oracle/apps/fnd/traindemo/webui/TrainRN
10.
Create a Standalone (Shared) TrainFooterRN
TrainDemoProj
> New > Web Tier > OA Components > Region
Name
-- TrainFooterRN
Package
-- xxcust.oracle.apps.fnd.traindemo.webui
Region
Style -- pageButtonBar
11.
Add navigrationBar
Select
TrainFooterRN in Structure pane right click > New > Region
Set
the region properties as follows:
ID
-- NavBar
Region
Style – navigationBar
First
Step – 1
Last
Step – 3
12.
Add Links to the navigrationBar
Right
Click on NavBar > New > link
Set
Item’s properties as follows:
ID
– Step1Link
Item
Style – link
Text
– Step 1 of 3: Page1
Warn
About Changes – False
Destination
URI -- /xxcust/oracle/apps/fnd/traindemo/webui/TrainDemoPG1
Right
Click on NavBar > New > link
Set
Item’s properties as follows:
ID
– Step2Link
Item
Style – link
Text
– Step 2 of 3: Page2
Warn
About Changes – False
Destination
URI -- /xxcust/oracle/apps/fnd/traindemo/webui/TrainDemoPG2
Right
Click on NavBar > New > link
Set
Item’s properties as follows:
ID
– Step3Link
Item
Style – link
Text
– Step 3 of 3: Page3
Warn
About Changes – False
Destination
URI -- /xxcust/oracle/apps/fnd/traindemo/webui/TrainDemoPG3
13.
Initialize the Footer Region
Select
TrainFooterRN in Structure pane right click > Set New Controller
Class
Name -- TrainDemoCO
Package
Name – xxcust.oracle.apps.fnd.traindemo.webui
Add
following code in processRequest()
import
oracle.apps.fnd.framework.webui.beans.nav.OATrainBean;
import oracle.apps.fnd.framework.webui.beans.nav.OANavigationBarBean;
...
import oracle.apps.fnd.framework.webui.beans.nav.OANavigationBarBean;
...
public
void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
{
super.processRequest(pageContext, webBean);
OATrainBean
trainBean =
(OATrainBean)pageContext.getPageLayoutBean().getLocation();
(OATrainBean)pageContext.getPageLayoutBean().getLocation();
trainBean.prepareForRendering(pageContext);
int step = trainBean.getSelectedTrainStepRenderedIndex();
int step = trainBean.getSelectedTrainStepRenderedIndex();
OANavigationBarBean
navBean =
(OANavigationBarBean)webBean.findChildRecursive("NavBar");
(OANavigationBarBean)webBean.findChildRecursive("NavBar");
navBean.setValue(step+1);
} // end processRequest()
} // end processRequest()
14.
Add the Navigation Region to your pages
For
each of three pages in the multistep flow, right click the PageLayoutRN in Structure pane and select New > Region
Set
the region’s properties as follow:
ID
-- PageButtonBar
Style
-- pageButtonBar
Extends
-- /xxcust/oracle/apps/fnd/traindemo/webui/TrainFooterRN
15.
Congratulation you have successfully finished. Run Your TrainDemoPG1 page and Test Your Work:
Some Other Most Useful OAF Tutorials:
- How To Call A Concurrent Program From OA Framework Pages
- How To Call A PL/SQL Procedure From An OAF Page
- How To Change The Header Of An Advance Table Column Dynamically
- How To Create A Submit Button Dynamically In OAF Page
- How To Import Oaf Pages From Unix Server Or Apps server.
- Implement PopList in OA Framework | OAF Tutorials
- Implementation of PPR [Partial Page Rendering] in OAF Page
- OA Framework Interview Questions And Answers - Part1
- VO Extension In OAF | Hiding An Item Conditionally Through SPEL In OAF
if we want to display any validation in between those pages how can i?
ReplyDelete