Search 800 + Posts

Oct 7, 2009

How to pass Parameters between ADF Pages. (SOA)

Test case – How to pass parameter between ADF Pages.we have an application to capture the details from credit card statements and then prepare Monthly Budget (Budget has Header, lines and spending category).
In this example,
1. I will create a Master – Detail Page based on the Budget Header and Lines. I will call it Budget detail page,
2. Create another page that will just Display the
a. Buget ID
b. Budget Name
c. Process flag. I will call it Budget Page.
3. At Run time, I open Budget Page (Display Budget Details in Table) and click Budget ID, and it will open Budget detail page with all the details of budget whose ID I have selected.

Open Oracle Jdeveloper (Jdev11g).
Select new application.
Select the template Fusion Web Application (ADF) and Wizard will help you to create TWO projects.
View Controller.

Model is for Data Control and ViewController for UI.

In Model Project Design the Business Services by selecting categories > business tier >ADF Business components >“Business Components from table”.
1. Complete Database connection Setup.
2. Select the budget header, budget_lines and budget_categories table and created Entity Object (EO) , then Create VO for Budget header and budget lines and finally create Application Module (AM)
3. Creation of Application Model will exposed our VO to client, and they will appear under Data Control.
4. Save your Work.

In ViewController Project open adfc-config.xml and drag a ADF page component by dragging View from Component palette. Save your work
1. Create Master Detail page (Budget detail page) for budget Header /Lines. (Refer my blog).
As shown Pic 1.1

2. Create Budget Page. This Page will display 3 columns of Budget Header table in tabular Form. As shown Pic 1.2

3.Drag “Control flow case” from the Component palette and draw link between these 2 as
shown Pic 1.3

4.Give name “budget” to flow from Budget Page to Budget detail page and Param between Budget detail page to Budget page.

5. (as Shown Pic 1.4)Open Budget Page, Follow below navigation
Data Control > Select Data Control for Budget Page > Operations > setCurrentRowWithKeyvalue.
Drag It and drop it over the BudgetID as “ADF Link” in BudgetPage.

6. (as Shown Pic 1.5 )
Go to Property of the BudgetID and copy value property.
Common>Value < #{row.BudgetId} 7. (as Shown Pic 1.6) Go to Property of line setCurrentRowWithKeyvalue replace Common >Text with #{row.BudgetID}

8. (as Shown Pic 1.7) Navigate to Binding tab from Designer tab and Click “setCurrentRowWithKeyvalue”. In structure window as shown in Pic 1.8, expand the “setCurrentRowWithKeyvalue” select rowkey

9. (as Shown Pic 1.9 ) In property box paste “#{row.BudgetId}” rowkey property “Ndvalue”.

10. (as Shown Pic 1.10) Click on the BudgetID link and in properties window select Action = Budget

11. Drag and drop button component on the Budget Detail Page , Open the Property tab for button and set Action = param.

12.Save your work and run the Page, as shown below.

1 comment: