Databases Reference
In-Depth Information
Figure 2-71. Behind the scenes of the complex dashboard
The definition of the HTML Region is
<div id="chartDiv"></div>
And this is how the Dynamic Action is defined:
Event: Page Load
True Actions
Action 1:
Action: Execute JavaScript Code
Fire When Event Result is: True
Fire On Page Load: No
Code:
chart = new AnyChart('#IMAGE_PREFIX#flashchart/anychart_5/swf/OracleAnyChart.swf',
'#IMAGE_PREFIX#flashchart/anychart_5/swf/Preloader.swf');
chart.width = 800;
chart.height = 500;
chart.setXMLFile('#OWNER#.GET_DASHBOARD_XML_PRC?p_param1=Full');
chart.write('chartDiv');
As you can see, there is almost no complex structure to the page. The Dynamic Action runs on Page
Load and will create a chart in the <div> tag. The only magic piece in the JavaScript is the call to
setXMLFile which gets the XML for the chart. In this case we didn't use a hidden item to store the XML as
that would give a problem for large datasets (more than 32K). Assigning a value to a page item is limited
to 32K, but because the dashboard we want to create is based on three different charts, passing the
information for all three charts will exceed that 32K limit. The setXMLFile calls a procedure on the server
called GET_DASHBOARD_XML_PRC . The #OWNER# will get replaced by the default parsing schema defined in
your workspace. The procedure has two parameters to pass extra information to the chart or change
behavior based on the user interaction, but there is another parameter called XMLCallDate which you
need to include because AnyChart is attaching extra parameters to the call. XMLCallDate is used by
Search WWH ::




Custom Search