Class actuate.viewer.PageContent
Description
A container for the content of a report document file. actuate.Viewer.PageContent contains a comprehensive list of report elements, such as tables, charts, labels, and data items.
Constructor
The PageContent object is constructed by actuate.viewer.getCurrentPageContent( ).
Function summary
Table 44‑49 lists actuate.viewer.PageContent functions.
Table 44‑49 actuate.viewer.PageContent functions
Function
Description
Returns a chart element specified by the given bookmark
Returns a data element specified by the given bookmark
Returns a Flash object specified by the given bookmark
Returns a Flash gadget specified by the given bookmark
Returns a label element specified by the given bookmark
Returns a table element specified by the given bookmark
Returns a text element specified by the given bookmark
Returns the viewer ID
getChartByBookmark
Syntax
actuate.report.Chart PageContent.getChartByBookmark(string bookmark)
Returns the chart element specified by the given bookmark.
Parameter
bookmark
String. A bookmark to identify a chart element. When the bookmark value is not given, this function returns the first chart element found in the report content.
Returns
actuate.report.Chart object.
Example
This example retrieves the Chart object and changes the chart title:
this.onclick = function(event){
var bviewer = this.getViewer( );
var bpagecontents = bviewer.getCurrentPageContent( );
var bchart = bpagecontents.getChartByBookmark("ChartBookmark");
bchart.setChartTitle("Orders By Country (Classic Cars)");
bchart.submit( );
}
getDataItemByBookmark
Syntax
actuate.report.DataItem PageContent.getDataItemByBookmark(string bookmark)
Returns the data element specified by the given bookmark.
Parameter
bookmark
String. A bookmark to identify a data element. When the bookmark value is not given, the first data element found in the report content is returned.
Returns
actuate.report.DataItem object.
Example
Use this function to access the bookmarks for specific elements in the page content. For example, to access the data element "myDataItem" on the page loaded in the myViewer viewer object, use the following code:
var element = myViewer.getCurrentPageContent( )
.getDataItemByBookmark("myDataItem");
getFlashObjectByBookmark
Syntax
actuate.report.FlashObject PageContent.getFlashObjectByBookmark(string bookmark)
Returns the Flash object specified by the given bookmark.
Parameter
bookmark
String. A bookmark to identify a Flash object. When the bookmark value is not given, the first data element found in the report content is returned.
Returns
actuate.report.FlashObject object.
Example
Use this function to access the bookmarks for specific elements in the page content. For example, to access the Flash object "myFlashObj" on the page loaded in the myViewer viewer object, use the following code:
var element = myViewer.getCurrentPageContent( )
.getFlashObjectByBookmark("myFlashObj");
getGadgetByBookmark
Syntax
actuate.report.Gadget PageContent.getGadgetByBookmark(string bookmark)
Returns the gadget element specified by the given bookmark.
Parameter
bookmark
String. A bookmark to identify a gadget element. When the bookmark value is not given, the first data element found in the report content is returned.
Returns
actuate.report.Gadget object.
Example
Use this function to access the bookmarks for specific elements in the page content. For example, to access the gadget "myGadget" on the page loaded in the myViewer viewer object, use the following code:
var element = myViewer.getCurrentPageContent( )
.getGadgetByBookmark("myGadget");
getLabelByBookmark
Syntax
actuate.report.Label PageContent.getLabelByBookmark(string bookmark)
Returns the label element specified by the given bookmark.
Parameter
bookmark
String. A bookmark to identify a label element. When the bookmark value is not given, the first label element found in the report content is returned.
Returns
actuate.report.Label object.
Example
Use this function to access the bookmarks for specific elements in the page content. For example, to access the label "LabelOne" on the page loaded in the myViewer viewer object, use the following code:
var element = myViewer.getCurrentPageContent( )
.getLabelByBookmark("LabelOne");
getTableByBookmark
Syntax
actuate.report.Table PageContent.getTableByBookmark(string bookmark)
Returns the table element specified by the given bookmark.
Parameter
bookmark
String. A bookmark to identify a table element. When the bookmark value is not given, the first table element found in the report content is returned.
Returns
actuate.report.Table object.
Example
Use this function to access the bookmarks for specific elements in the page content. For example, to access the table mytable on the page loaded in the myViewer viewer object, use the following code:
var element = myViewer.getCurrentPageContent( )
.getTableByBookmark("mytable");
getTextByBookmark
Syntax
actuate.report.TextItem PageContent.getTextByBookmark(string bookmark)
Returns the text element specified by the given bookmark.
Parameter
bookmark
String. A bookmark to identify a text element. If the bookmark value is not given, the first text element found in the report content is returned.
Returns
actuate.report.TextItem object.
Example
Use this function to access the bookmarks for specific elements in the page content. For example, to access the text item "myTextItem" on the page loaded in the myViewer viewer object, use the following code:
var element = myViewer.getCurrentPageContent( )
.getTextByBookmark("myTextItem");
getViewerId
Syntax
string PageContent.getViewerId( )
Returns the viewer ID.
Returns
String. The viewer ID.
Example
This example displays the viewer ID in an alert box:
alert("The Viewer ID is " + myViewer.getViewerId( ));