Classes


Class actuate.data.Sorter

Specifies the conditions for sorting data as it is returned by a request or stored temporarily in a local actuate.data.ResultSet object. The sort arranges rows based on the value of a specified column.
Member of: actuate.data.

Class Summary
Constructor Attributes Constructor Name and Description
 
actuate.data.Sorter(columnName, ascending)
Constructs a Sorter object.
Method Summary
Method Attributes Method Name and Description
 
Returns the name of the column to sort on.
 
Returns true if the current sort order is ascending.
 
setAscending(ascending)
Sets the sort order to ascending or descending.
 
setColumnName(columnName)
Sets the column to sort on.
Class Detail
actuate.data.Sorter(columnName, ascending)
Constructs a Sorter object.
Parameters:
{String} columnName
The name of the column to sort.
{boolean} ascending
True sets sorting to ascending. False sets sorting to descending.
Method Detail
{String} getColumnName()
Returns the name of the column to sort on. This example displays an alert box that contains the column name currently being sorted on:
	function showMyColumnName(mySorter){
		var sortColName = mySorter.getColumnName( );
		alert(sortColName);
	}
Returns:
{String} The column name.

{boolean} isAscending()
Returns true if the current sort order is ascending. Returns false if the current order is descending. This example checks if the current sort order is ascending. When the current sort order is descending, this code sets the order to ascending:
	function makeAscending(mySort){
		if (mySort.isAscending( )) {
			return;
		} else {
			mySort.setAscending(true);
		}
	}
Returns:
{boolean} True indicates ascending. False inidcates descending.

{void} setAscending(ascending)
Sets the sort order to ascending or descending. This example checks if the current sort order is descending. When the current sort order is ascending, this code sets the order to descending:
	function makeAscending(mySort){
		if (mySort.isAscending( )) {
			return;
		} else {
			mySort.setAscending(true);
		}
	}
Parameters:
{boolean} ascending
True sets the sort order to ascending. False sets the sort order to descending.
Returns:
{void}

{void} setColumnName(columnName)
Sets the column to sort on. This example makes the current sorter arrange the result set ascending by the Sales column:
	function makeAscendingOnSales(mySort){
		mySort.setColumnName("Sales");
		if (mySort.isAscending( )) {
			return;
		} else {
			mySort.setAscending(true);
		}
	}
Parameters:
{String} columnName
The column name.
Returns:
{void}

Documentation generated by JsDoc Toolkit 2.0.1 on Tue Jan 29 2013 05:44:21 GMT-0800 (PST)