Class actuate.report.Gadget
Description
A container for a Flash gadget object in a report. The Gadget class provides functions to operate on a Flash gadget object, such as retrieving content and getting the HTML DOM element from the report Flash element.
Constructor
The Gadget object is constructed by viewer.PageContent.getGadgetByBookmark( ).
Function summary
Table 4-28 lists actuate.report.Gadget functions.
Table 4-28 actuate.report.Gadget functions getType( ) hide( ) setSize( ) show( ) submit( )actuate.report.Gadget.clearFilters
Syntax
Clears the filters of a given column.
Parameters
String. The name of the column from which to clear the filters.
Example
This example clears existing filters from the PRODUCTLINE column.
actuate.report.Gadget.getBookmark
Syntax
Returns the bookmark of this Gadget element.
Returns
Example
This example displays the gadget’s bookmark in an alert box.
actuate.report.Gadget.getHtmlDom
Syntax
Returns the HTML element for this gadget.
Returns
Example
This example displays the HTML DOM element for this gadget inside a red border.
actuate.report.Gadget.getPageContent
Syntax
Returns the page content to which this gadget belongs.
Returns
actuate.viewer.PageContent. report content.
Example
This example displays the viewer ID of the page content in an alert box.
actuate.report.Gadget.getType
Syntax
Returns the report element type of this object, which is Gadget.
Returns
Example
This example checks the report element type and displays an alert if the type is not "Gadget".
if (myGadget.getType( ) != "Gadget"){actuate.report.Gadget.hide
Syntax
Example
Use hide( ) to hide a Gadget, as shown in the following code:
actuate.report.Gadget.setFilters
Syntax
void Gadget.setFilters(actuate.data.Filter[ ] filters)Parameters
An array of actuate.data.Filter objects. The filter conditions to apply to this chart element.
Example
This example applies a filter to the gadget.
actuate.report.Gadget.setGadgetType
Syntax
Specify the gadget type for the Gadget element. The chart type is a constant.
Parameters
String. The possible values are constants as listed below:
Example
To change the gadget type to a meter, use code similar to the following:
actuate.report.Gadget.setSize
Syntax
Specifies the width and height of a gadget in pixels.
Parameters
Integer. The height in pixels.
Example
To set the gadget to a 300 by 300 pixel square area, use code similar to the following:
actuate.report.Gadget.show
Syntax
Example
Use show( ) to reveal a hidden Gadget, as shown in the following code:
actuate.report.Gadget.submit
Syntax
Submits all the asynchronous operations for this Gadget. Submit( ) triggers an AJAX request for all asynchronous operations. When the server finishes the processing, it returns a response and the results are rendered on the page in the Gadget container.
Parameters
Function. The function to execute after the asynchronous call processing is done.
Example
This example clears existing filters from the PRODUCTLINE column and pops up an alert box.
(c) Copyright Actuate Corporation 2011 |
![]() |