A container for a Label element in a report. Label provides functions to operate on a Label element, such as retrieving the label text and getting the HTML DOM element from the report label.
Constructor
The Label object is constructed by viewer.PageContent.getLabelByBookmark( ).
Returns the page content to which this Label belongs.
Returns
actuate.viewer.PageContent. report content.
Example
This example displays the viewer ID of the page content in an alert box:
function showViewID(myLabel){
var pageContent = myLabel.getPageContent( );
var pageViewerID = pageContent.getViewerId( );
alert (pageViewerID);
}
getType
Syntax
string Label.getType( )
Returns the report element type of this object, which is Label.
Returns
String. "Label".
Example
This example checks the report element type and displays an alert if the type is not "Label":
if (myElement.getType( ) != "Label"){
alert("Type mismatch, report element type is not Label")
}
hide
Syntax
void Label.hide( )
Hides this element.
Example
Use hide( ) to hide a report label, as shown in the following code:
myLabel.hide( );
show
Syntax
void Label.show( )
Shows this element.
Example
Use show( ) to reveal a report label, as shown in the following code:
myLabel.show( );
submit
Syntax
void Label.submit(function callback)
Submits all the asynchronous operations for this Label. 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 label container.
Parameter
callback
Function. The function to execute after the asynchronous call processing is done.
Example
Use submit( ) to execute changes on a Label object, as shown in the following code: