Dynamically changing DVT Graph at Runtime
Posted
by mona.rakibe(at)oracle.com
on Oracle Blogs
See other posts from Oracle Blogs
or by mona.rakibe(at)oracle.com
Published on Wed, 23 Feb 2011 01:47:15 +0000
Indexed on
2011/02/23
7:30 UTC
Read the original article
Hit count: 413
[Note] : In the below sample, every-time user changes graph type there is a server trip, so please use this approach with performance implications in mind.
This sample can be downloaded from
Set-up:
Create a BAM data control using
employees DO (sample)(Refer this entry)
Steps:
Create the View
- Create a new JSF page .
- From component palette drag and drop "Select One Radio" into this page
- Enter some Label and click "Finish"In Property Editor set the "AutoSubmit" property to true
- Now drag and drop "Switcher" from components into this page.
- In the Structure pane select the af:switcher right click and surround with "PanelGroupLayout"
- In Property Editor set the "PartialTriggers" property of PanelGroupLayout to the id of af:selectOneRadio
- Again in the Structure pane select the af:switcher right click and select "Insert inside af:switcher->facet"
- Enter Facet name (ex: pie)
- Again in the Structure pane select the af:switcher right click and select "Insert inside af:switcher->facet"
- Enter another Facet name (ex: bar)
- From "Data Controls" drag and drop "Employees->Query" into the pie facet as "Graph->Pie" (Pie: Sales_Number and Slices: Salesperson)
- From "Data Controls" drag and drop "Employees->Query" into the bar facet as "Graph->Bar" (Bars :Sales_Number and X-axis : Salesperson).
- Now wire the switcher to the af:selectOneRadio using their "facetName" and "value" property respectively.
- Now run the page, notice that graph renders as per the selection by user.
© Oracle Blogs or respective owner