Class actuate.report.FlashObject
Description
A container for a Flash object in a report. FlashObject provides functions to operate on a Flash object, such as retrieving content and getting the HTML DOM element from the report Flash element.
Constructor
The FlashObject object is constructed by actuate.viewer.PageContent.getFlashObjectByBookmark( ).
Function summary
Table 44‑28 lists actuate.report.FlashObject functions.
Table 44‑28 actuate.report.FlashObject functions
Function
Description
Removes filters from this FlashObject
Returns the bookmark name for this FlashObject
Returns the HTML element for this FlashObject
Returns the report element instance id
Returns the page content to which this element belongs
getType( )
Returns the FlashObject’s element type
hide( )
Hides this element
Adds filters to this FlashObject
show( )
Shows this element
submit( )
Applies changes made to this FlashObject
clearFilters
Syntax
void FlashObject.clearFilters(string columnName)
Clears the filters of a given column.
Parameter
columnName
String. The name of the column from which to clear the filters.
Example
This example clears existing filters from the PRODUCTLINE column:
function resetFilter(flashobj){
flashobj.clearFilters("PRODUCTLINE");
flashobj.submit( );
}
getBookmark
Syntax
string FlashObject.getBookmark( )
Returns the bookmark of this FlashObject element.
Returns
String.
Example
This example displays the Flash object’s bookmark in an alert box:
function alertBookmark(myFlashobj){
alert(myFlashobj.getBookmark( ));
}
getHtmlDom
Syntax
HTMLElement FlashObject.getHtmlDom( )
Returns the HTML element for this FlashObject.
Returns
HTMLElement.
Example
This example displays the HTML DOM element for this data item inside a red border:
function showHtmlDom(myFlashobj){
var domNode = myFlashobj.getHtmlDom( );
var box = document.createElement('div');
box.style.border = '2px solid red';
var label = document.createElement('h2');
label.innerHTML = 'The HTML DOM:';
box.appendChild(label);
box.appendChild(domNode);
document.body.appendChild(box);
}
getInstanceId
Syntax
string FlashObject.getInstanceId( )
Returns the instance id of this report element.
Returns
String. The instance id.
Example
This example displays the instance ID of the report element in an alert box:
function showID(myFlashObject){
var elementID = myFlashObject.getInstanceId( );
alert (elementID);
}
getPageContent
Syntax
actuate.viewer.PageContent FlashObject.getPageContent( )
Returns the page content to which this FlashObject belongs.
Returns
actuate.viewer.PageContent. report content.
Example
This example displays the viewer ID of the page content in an alert box:
function showViewID(myFlashobj){
var pageContent = myFlashobj.getPageContent( );
var pageViewerID = pageContent.getViewerId( );
alert (pageViewerID);
}
getType
Syntax
string FlashObject.getType( )
Returns the report element type of this object, which is FlashObject.
Returns
String. "FlashObject".
Example
This example checks the report element type and displays an alert if the type is not "FlashObject":
if (myFlashObject.getType( ) != "FlashObject"){
alert("Type mismatch, report element type is not FlashObject");
}
hide
Syntax
void FlashObject.hide( )
Hides this element.
Example
Use hide( ) to hide the Flash object, as shown in the following code:
myFlashobj.hide( );
setFilters
Syntax
void FlashObject.setFilters(actuate.data.Filter[ ] filters)
Sets the given filters.
Parameter
filters
An array of actuate.data.Filter objects. The filter conditions to apply to this chart element.
Example
This example applies a filter to the Flash object:
function newFilter(myFlashobj){
var filter = new
actuate.data.Filter("PRODUCTLINE", "=", "Trucks and Buses");
var filters = new Array( );
filters.push(filter);
myFlashobj.setFilters(filters);
}
show
Syntax
void FlashObject.show( )
Shows this element.
Example
Use show( ) to reveal a hidden Flash object, as shown in the following code:
myFlashobj.show( );
submit
Syntax
void FlashObject.submit(function callback)
Submits all the asynchronous operations for this FlashObject. 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 FlashObject container.
Parameter
callback
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:
function alertResetFilter(flashobj){
flashobj.clearFilters("PRODUCTLINE");
flashobj.submit(alert("Filters Cleared"));
}