Actuate JavaScript API classes : Class actuate.parameter.ParameterData

Class actuate.parameter.ParameterData

Description

The ParameterData class is a high-level wrapper for an actuate.parameter.ParameterDefinition object.

Constructor

Syntax

string actuate.parameter.ParameterData(string reportName, actuate.parameter.ParameterDefinition pd)

Constructs a new ParameterData object.

Parameters

reportName

String. The name of the report where the parameter definition originates.

pd

actuate.parameter.ParameterDefinition object. The parameter definition set for this parameter data object.

Function summary

Table 4-22 lists the actuate.parameter.ParameterData functions.

actuate.parameter.ParameterData.getCascading
ParentValues

Syntax

actuate.parameter.ParameterValue[ ] ParameterData.getCascadingParentValues( actuate.parameter.ParameterValue[ ] parentValues)

Returns the cascading parent value.

Parameters

parentValues

An array of actuate.parameter.ParameterValue objects. This array is the one to be populated.

Returns

An array of actuate.parameter.ParameterValue objects. This is the input array populated with the cascading parent values

Example

This sample code returns a storage array of actuate.parameter.ParameterValue objects representing the cascading parent values.

var parentValues = new Array( );
parentValues = myParamData.getCascadingParentValues(parentValues);

actuate.parameter.ParameterData.getChildData

Syntax

actuate.parameter.ParameterData ParameterData.getChildData( )

Returns the child ParameterData object.

Returns

actuate.parameter.ParameterData object.

Example

This sample code calls getChildData( ) to assign the child ParameterData object to the myChildData variable.

var myChildData = myParameterData.getChildData( );

actuate.parameter.ParameterData.getControlType

Syntax

string ParameterData.getControlType( )

Returns the controlType UI value for this ParameterData object.

Returns

String. The controlType UI value. Legal controlType UI values are:

n  
n  
n  
n  
n  
n  

Example

This sample code displays the controlType UI value for the myParamData object in an alert box.

alert(myParamData.getControlType( ));

actuate.parameter.ParameterData.getCurrentValue

Syntax

actuate.parameter.ParameterValue ParameterData.getCurrentValue( )

Returns the current UI value set by the UI control.

Returns

actuate.parameter.ParameterValue. This function returns null when the UI control has not set a value.

Example

This sample code calls getCurrentValue( ) to assign the current UI value to the myCurrVal variable.

var myCurrVal = myParameterData.getCurrentValue( );

actuate.parameter.ParameterData.getDefaultValue

Syntax

string ParameterData.getDefaultValue( )

Returns the default value for this ParameterData object. Returns null when the default value is null.

Returns

String. The default value.

Example

This sample code displays the default value for the myParamData object in an alert box.

alert(myParamData.getDefaultValue( ));

actuate.parameter.ParameterData.getHelpText

Syntax

string ParameterData.getHelpText( )

Returns the help text for this ParameterData object.

Returns

String. The help text.

Example

This sample code displays the help text for the myParamData object in an alert box.

alert(myParamData.getHelpText( ));

actuate.parameter.ParameterData.getNameValueList

Syntax

actuate.parameter.NameValuePair[ ] ParameterData.getNameValueList( )

Returns the list of name-value pairs for this ParameterData object.

Returns

Array of actuate.parameter.NameValuePair objects.

Example

This example stores the array of NameValuePair objects for the myParamValues object in a variable called myNVList.

var myNVList = new Array( );
myNVList = myParamValues.getNameValueList( );

actuate.parameter.ParameterData.getParameterName

Syntax

string ParameterData.getParameterName( )

Returns the parameter name for this ParameterData object.

Returns

String. The parameter name.

Example

This sample code displays the parameter name for the myParamData object in an alert box.

alert(myParamData.getParameterName( ));

actuate.parameter.ParameterData.getParentData

Syntax

actuate.parameter.ParameterData ParameterData.getParentData( )

Returns the parent ParameterData object.

Returns

actuate.parameter.ParameterData object.

Example

This sample code calls getParentData( ) to assign this ParameterData object’s parent ParameterData object to the myParentData variable.

var myParentData = myParameterData.getParentData( );

actuate.parameter.ParameterData.getPickList

Syntax

actuate.parameter.ParameterValue[ ] ParameterData.getPickList(function callback)

Parameters

callback

Function. An optional function to call when this function completes. This function receives the following parameters:

n  
n  

Returns

An array of actuate.parameter.ParameterValue objects.

Example

This sample code uses the callback function runNext( ) to display the pick list’s total left over count in an alert box and assigns the array of NameValuePair objects to the pickListNVPairs variable.

paramObj.getPickList(runNext);
function runNext(pairs, leftover){
  alert(leftover);
  var pickListNVPairs = new Array( );
  pickListNVPairs = pairs;
}

actuate.parameter.ParameterData.getPromptText

Syntax

string ParameterData.getPromptText( )

Returns the prompt text for this ParameterData object.

Returns

String. The prompt text.

Example

This sample code displays the prompt text for the myParamData object in an alert box.

alert(myParamData.getPromptText( ));

actuate.parameter.ParameterData.getSuggestionList

Syntax

string[ ] ParameterData.getSuggestionList(function callback, string)

Returns the filter-based suggestion list for this ParameterData object.

Parameters

callback

Function. An optional function to call when this function completes. This function receives an array of actuate.parameter.NameValuePair objects as a parameter.

string

String. The filter for the suggestion list.

Example

This sample code uses the string "Trucks" to callback function runNext( ) to filter the suggestion list and assigns the filtered NameValuePair objects to the mySuggestions variable.

paramObj.getSuggestionList(runNext, "Trucks");
function runNext(suggested){
  var mySuggestions = new Array( );
  mySuggestions = suggested;
}

actuate.parameter.ParameterData.isAdhoc

Syntax

boolean ParameterData.isAdhoc( )

Returns true when this parameter is ad-hoc.

Returns

Boolean. True when this parameter is ad-hoc.

Example

This example displays the ad-hoc status of a parameter in an alert box.

alert(paramData.isAdhoc( ));

actuate.parameter.ParameterData.isCascading
Parameter

Syntax

boolean ParameterData.isAdhoc( )

Returns true when this parameter is a cascading parameter.

Returns

Boolean. True when this parameter is a cascading parameter.

Example

This example displays the cascading parameter status of a parameter in an alert box.

alert(paramData.isCascadingParameter( ));

actuate.parameter.ParameterData.isDynamicFilter

Syntax

boolean ParameterData.isDynamicFilter( )

Returns true when this parameter is a dynamic filter.

Returns

Boolean. True when this parameter is a dynamic filter.

Example

This example displays the dynamic filter status of a parameter in an alert box.

alert(paramData.isDynamicFilter( ));

actuate.parameter.ParameterData.isMultiList

Syntax

boolean ParameterData.isMultiList( )

Returns true when this parameter is shown as a multi-list UI element.

Returns

Boolean. True when this parameter is shown as a multi-list UI element.

Example

This example displays the multi-list UI element status of a parameter in an alert box.

alert(paramData.isMultiList( ));

actuate.parameter.ParameterData.isRequired

Syntax

boolean ParameterData.isRequired( )

Returns true when this parameter is required.

Returns

Boolean. True when this parameter is required.

Example

This example displays the required status of a parameter in an alert box.

alert(paramData.isRequired( ));

actuate.parameter.ParameterData.setChildData

Syntax

void ParameterData.setChildData(actuate.parameter.ParameterData childData)

Indicates that the parameter data contains a child.

Parameters

childData

An actuate.parameter.ParameterData object that contains the child for this ParameterData object.

Example

This sample code sets the ParameterData object myChildData as the child of the ParameterData object myParamData.

myParamData.setChildData(myChildData);

actuate.parameter.ParameterData.setCurrentValue

Syntax

void ParameterData.setCurrentValue(actuate.parameter.ParameterValue value)

Sets the UI value of the UI control. When a UI value changes, UIControl calls this method to update the ParameterData object.

Parameters

value

An actuate.parameter.ParameterValue object set by the UI.

Example

This sample code sets the ParameterValue object myValue as the value of the ParameterData object myParamData.

myParamData.setCurrentValue(myValue);

actuate.parameter.ParameterData.setParentData

Syntax

void ParameterData.setParentData(parentData)

Indicates that the parameter data contains a parent.

Parameters

parentData

An actuate.parameter.ParameterData object that contains the parent for this ParameterData object.

Example

This sample code sets the ParameterData object myParentData as the parent of the ParameterData object myParamData.

myParamData.setParentData(myParentData);

actuate.parameter.ParameterData.setWebService

Syntax

void ParameterData.setWebService(object webService)

Defines a web service to send SOAP messages.

Parameters

webService

Object. A web service to send SOAP messages.


(c) Copyright Actuate Corporation 2011