A container for a Text element in a report. TextItem provides functions to operate on a Text element, such as retrieving the text value and getting the HTML DOM element from the report Text element.
Constructor
The TextItem object is constructed by viewer.PageContent.getTextByBookmark( ).
Returns the page content to which this Text belongs.
Returns
actuate.viewer.PageContent. report content.
Example
This example displays the viewer ID of the page content in an alert box:
function showViewID(myTextItem){
var pageContent = myTextItem.getPageContent( );
var pageViewerID = pageContent.getViewerId( );
alert (pageViewerID);
}
getText
Syntax
string TextItem.getText( )
Returns the text of this Text element.
Returns
String. The content text.
Example
This example displays the text of the myTextItem object in an alert box:
alert("Text content for myTextItem is " + myTextItem.getText( ));
getType
Syntax
string TextItem.getType( )
Returns the report element type of this object, which is Text.
Returns
String. "Text".
Example
This example checks the report element type and displays an alert if the type is not "Text":
if (myTextItem.getType( ) != "Text"){
alert("Type mismatch, report element type is not Text");
}
hide
Syntax
void TextItem.hide( )
Hides this element.
Example
This example hides myTextItem:
myTextItem.hide( );
myTextItem.submit( );
show
Syntax
void TextItem.show( )
Shows this element.
Example
This example shows myTextItem:
myTextItem.show( );
myTextItem.submit( );
submit
Syntax
void TextItem.submit(function callback)
Submits all the asynchronous operations for this TextItem. The submit( ) function triggers an AJAX request for all asynchronous operations. The server returns a response after processing. The results render on the page in the TextItem container.
Parameter
callback
Function. The function to execute after the asynchronous call processing is done.
Example
This example uses submit( ) after calling show( ) to show myTextItem: