This example clears existing filters from the PRODUCTLINE column:
function resetFilter(myTable){
myTable.clearFilters("PRODUCTLINE");
myTable.submit( );
}
getBookmark
Syntax
string Table.getBookmark( )
Returns the Table’s name.
Returns
String. The name of the Table.
Example
This example displays the Table’s bookmark in an alert box:
function alertBookmark(myTable){
alert(myTable.getBookmark( ));
}
getColumn
Syntax
array[ ] Table.getColumn(integer columnIndex)
Gets the Table data by column index. Returns the data from the current visible page.
Parameter
columnIndex
Integer. Optional. The numerical index of the column from which to retrieve data. The getColumn( ) function returns the values for the first column when no value is provided for columnIndex.
Returns
Array. A list of data in the format of the column.
Example
This example returns the first column in myTable:
function getMyColumn(myTable) {
return myTable.getColumn( );
}
getHtmlDom
Syntax
HTMLElement Table.getHtmlDom( )
Returns the Table’s name.
Returns
String. The name of the Table.
Example
This example displays the HTML DOM element for this Table inside a red border:
function showHtmlDom(myTable){
var domNode = myTable.getHtmlDom( );
var box = document.createElement('div');
box.style.border = '2px solid red';
var label = document.createElement('h2');
label.innerHTML = 'The HTML DOM:';
box.appendChild(label);
box.appendChild(domNode);
document.body.appendChild(box);
}
getInstanceId
Syntax
string Table.getInstanceId( )
Returns the instance id of this report element.
Returns
String. The instance id.
Example
This example displays the instance ID of the report element in an alert box:
Returns the page content to which this Table belongs.
Returns
actuate.viewer.PageContent. report content.
Example
This example displays the viewer ID of the page content in an alert box:
function showViewID(myTable){
var pageContent = myTable.getPageContent( );
var pageViewerID = pageContent.getViewerId( );
alert (pageViewerID);
}
getRow
Syntax
array[ ] Table.getRow(integer rowIndex)
Gets the Table data by row index. Returns the data from the current visible page.
Parameter
rowIndex
Integer. Optional. The numerical index of the row from which to retrieve data. The getRow( ) function returns the values for the first row when no value for rowIndex is provided.
Returns
Array. A list of data in the format of the columns that cross the row.
Example
This example retrieves the first row in myTable:
function getMyRow(myTable) {
return myTable.getRow( );
}
getType
Syntax
string Table.getType( )
Returns the report element type of this object, which is Table.
Returns
String. "Table".
Example
This example returns the report element type of this object in an alert box:
function getTableType(myTable) {
alert("Element type is: " + myTable.getType( ));
}
groupBy
Syntax
void Table.groupBy(string columnName)
Groups the data in a table by the values in a given column. If there is an existing group, this operation will add the new group after the existing group.
Parameter
columnName
String. The name of the column to use for the innermost group to the Table.
Example
This example groups the data in myTable by the values in the TOTAL column:
function groupByColumn(myTable) {
myTable.groupBy("TOTAL");
}
hide
Syntax
void Table.hide( )
Hides this element.
Example
This example hides myTable:
myTable.hide( );
hideColumn
Syntax
void Table.hideColumn(string columnName)
Hides a table column by specifying the column name.
Parameter
columnName
String. The data binding name for the column to hide.
Example
This example hides the TOTAL column from myTable:
function myHiddenColumn(myTable) {
myTable.hideColumn("TOTAL");
myTable.submit( );
}
hideDetail
Syntax
void Table.hideDetail(string columnName)
Hides information for a column from the grouped data displayed on the page. If every column is hidden, only the group name is visible.
Parameter
columnName
String. The data binding name for the column to hide.
Example
This example hides the TOTAL column from the grouped data visible for myTable:
function hideMyDetail(myTable) {
myTable.hideDetail("TOTAL");
myTable.submit( );
}
removeGroup
Syntax
void Table.removeGroup()
Removes the innermost group.
Example
This example removes the innermost group from myTable and displays an alert box after calling submit( ):
Use show( ) to reveal a report Table, as shown in the following code:
myTable.show( );
showColumn
Syntax
void Table.showColumn(string columnName)
Shows the Table column by specifying the column name.
Parameter
enabled
String. The data binding name for the column to display.
Example
This example shows the PRODUCTLINE column in myTable:
function showMyColumn(myTable) {
myTable.showColumn("PRODUCTLINE");
myTable.submit( );
}
showDetail
Syntax
void Table.showDetail(string columnName)
Displays information for a column from the grouped data displayed on the page. If every column is hidden, only the group name is visible.
Parameter
columnName
String. The data binding name for the column to display.
Example
This example shows the information from the PRODUCTLINE column in the grouped data that is displayed for myTable:
function showMyDetail(myTable) {
myTable.showDetail("PRODUCTLINE");
myTable.submit( );
}
submit
Syntax
void Table.submit(function callback)
Submits all the asynchronous operations for this Table element. The submit( ) function triggers an AJAX request to submit all the asynchronous operations. When the server finishes the processing, it returns a response and the results are rendered on the page in the table container.
Parameter
callback
Function. The function called after the asynchronous call processing finishes.
Example
This example clears existing filters from the PRODUCTLINE column and pops up an alert box: