Actuate JavaScript API classes : Class actuate.viewer.SelectedContent

Class actuate.viewer.SelectedContent

Description

A container for content selected in the viewer. SelectedContent provides an object to pass to a handler when the user-defined ON_CONTENT_SELECTED event occurs. This object contains an instance of the element selected in the viewer.

Constructor

TheSelectedContent object is constructed when an ON_CONTENT_SELECTED event occurs.

Function summary

Table 4-46 lists actuate.viewer.SelectedContent functions.

actuate.viewer.SelectedContent.getColumnIndex

Syntax

integer SelectedContent.getColumnIndex( )

Returns the numerical index for the currently selected column. Returns null when the user selects a non-table element.

Returns

Integer.

Example

To retrieve the index of a column selected, use the following code:

var index = selected.getColumnIndex( );

actuate.viewer.SelectedContent.getSelectedElement

Syntax

object SelectedContent.getSelectedElement( )

Returns an instance of the currently selected element. The instance can be one of the following objects:

n  
n  
n  
n  

To determine the object type, use the Object.getType( ) function. The type strings for the above objects are "Chart", "Data", "Label", "Table", or "Text" respectively.

Returns

Object. An instance of the currently selected element.

Example

To retrieve and store a label bookmark if a selected element is a label, use the following code:

var selected = selected.getColumnIndex( );
if (selected.getType( ) == actuate.report.Label){
  var bmark = Object.getBookmark( );
}

(c) Copyright Actuate Corporation 2011