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