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 4-28 lists actuate.report.FlashObject functions.
actuate.report.FlashObject.clearFilters
Syntax
void FlashObject.clearFilters(string columnName)
Clears the filters of a given column.
Parameters
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( );
}
actuate.report.FlashObject.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( ));
}
actuate.report.FlashObject.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);
}
actuate.report.FlashObject.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);
}
actuate.report.FlashObject.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);
}
actuate.report.FlashObject.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");
}
actuate.report.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( );
actuate.report.FlashObject.setFilters
Syntax
void FlashObject.setFilters(actuate.data.Filter[ ] filters)
Sets the given filters.
Parameters
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);
}
actuate.report.FlashObject.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( );
actuate.report.FlashObject.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.
Parameters
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"));
}

Additional Links:

Copyright Actuate Corporation 2012