BAM Data Control in multiple ADF Faces Components
Posted
by [email protected]
on Oracle Blogs
See other posts from Oracle Blogs
or by [email protected]
Published on Mon, 12 Apr 2010 20:27:53 +0000
Indexed on
2010/04/12
23:34 UTC
Read the original article
Hit count: 502
BAM Data Control multiple
As we know Oracle BAM data control instance sharing is not supported.
When two or more ADF Faces components must display the same data, and are bound to the same Oracle BAM data control definition, we have to make sure that we wrap each ADF Faces component in an ADF task flow, and set the Data Control Scope to isolated.
This blog will show a small sample to demonstrate this.
In this sample we will create a Pie and Bar using same BAM DC, such that both components use same Data control but have isolated scope.
This sample can be downloaded from
Sample1.zipSet-up:
Create a BAM data control using employees DO (sample)
Steps:
Right click on View Controller project and select "New->ADF Task Flow"
Check "Create Bounded Task Flow" and give some meaningful name (ex:EmpPieTF.xml ) to the TaskFlow(TF) and click on "OK"
CreateTF.bmp
From the "Components Palette", drag and drop "View" into the task flow diagram. Give a meaningful name to the view.
Double Click and Click "Ok" for "Create New JSF Page Fragment"
From "Data Controls" drag and drop "Employees->Query" into this jsff page as "Graph->Pie" (Pie: Sales_Number and Slices: Salesperson)
Repeat step 1 through 4 for another Task Flow (ex: EmpBarTF).
From "Data Controls" drag and drop "Employees->Query" into this jsff page as "Graph->Bar" (Bars :Sales_Number and X-axis : Salesperson).
Open the Taskflow created in step 2.
In the Structure Pane, right click on "Task Flow Definition -EmpPieTF"
Click "Insert inside Task Flow Definition - EmpPieTF -> ADF Task Flow -> Data Control Scope". Click "OK"
TFDCScope.bmp
For the "Data Control Scope", In the Property Inspector ->General section, change data control scope from Shared to Isolated.
Repeat step 8 through 11 for the 2nd Task flow created.
Now create a new jspx page example: Main.jspx
- Drag and drop both the Task flows (ex: "EmpPieTF" and "EmpBarTF") as regions. Surround with panel components as needed.
- Run the page Main.jspx
MainPage.bmp
Now when the page runs although both components are created using same Data control the bindings are not shared and each component will have a separate instance of the data control.
© Oracle Blogs or respective owner