Class actuate.parameter.ParameterDefinition
Description
The ParameterDefinition object contains all of the qualities, values, names, and conditions for a parameter. A ParameterDefinition object can display options to the user and respond to user-generated events. The actuate.Parameter class downloads an array of ParameterDefinition objects with downloadParameters( ). The order of this array is also the order in which the parameters are displayed. Parameters can be grouped to divide the parameters on the page into logical sets under a heading.
This class requires significant memory and bandwidth resources. ParameterValue is much smaller than ParameterDefinition. ParameterValue is the more efficient way to communicate to the server that a parameter value has changed.
Constructor
Syntax
Constructs a new ParameterDefinition object.
Function summary
Table 4-23 lists actuate.parameter.ParameterDefinition functions.
actuate.parameter.ParameterDefinition.getAutoSuggestThreshold
Syntax
Gets the autosuggest threshold value for this ParameterDefinition. The autosuggest threshold determines the number of characters a user types in before they are given suggestions from autosuggest.
Returns
Example
To store the autosuggest threshold of the parameter definition paramdef in a variable called threshold, use code similar to the following:
actuate.parameter.ParameterDefinition.getCascadingParentName
Syntax
Gets the cascadingParentName value for this ParameterDefinition. A cascading parent parameter is only used when on parameter depends upon another.
Returns
Example
To store the cascading parent name of the parameter definition paramdef in a variable called parentname, use code similar to the following:
actuate.parameter.ParameterDefinition.getColumnName
Syntax
Gets the columnName value for this ParameterDefinition. This setting sets the column to retrieve data from for an ad hoc parameter that performs a query.
This setting has no effect on other types of parameters.
Returns
Example
To store the column name of the parameter definition paramdef in a variable called columnname, use code similar to the following:
actuate.parameter.ParameterDefinition.getColumnType
Syntax
Gets the columnType value for this ParameterDefinition. This setting sets the data type queried by an ad hoc parameter that performs a query.
This setting has no effect on other types parameters.
Returns
String. Possible values are: "Currency", "Date", "DateOnly", "Time", "Double", "Integer" "String", "Boolean", "Structure", "Table", "Unknown"
Example
To store the column type of the parameter definition paramdef in a variable called columntype, use code similar to the following:
actuate.parameter.ParameterDefinition.getControlType
Syntax
Gets the controlType value for this ParameterDefinition. It determines the form element displayed for the user to set the parameter value.
Returns
String. Possible values are: null, "", "ControlRadioButton", "ControlList", "ControlListAllowNew", "ControlCheckBox"
Example
To store the control type string for the parameter definition paramdef in a variable called controltype, use code similar to the following:
actuate.parameter.ParameterDefinition.getCurrent
DisplayNameSyntax
Gets the current display name for this ParameterDefinition.
Returns
Example
To store the current display name of the parameter definition paramdef in a variable called displayname, use code similar to the following:
actuate.parameter.ParameterDefinition.getDataType
Syntax
Gets the dataType value for this ParameterDefinition.
Returns
String. Possible values are: "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", "Unknown"
Example
To store the data type of the parameter definition paramdef in a variable called type, use code similar to the following:
actuate.parameter.ParameterDefinition.getDefaultValue
Syntax
Gets the defaultValue value for this ParameterDefinition, if applicable.
Returns
Example
To store the default value as a string for the parameter definition paramdef in a variable called default, use code similar to the following:
actuate.parameter.ParameterDefinition.getDefaultValueIsNull
Syntax
Returns True when the parameter’s default value is null.
Returns
Example
To alert the user that the default value is null for the parameter definition paramdef, use code similar to the following:
actuate.parameter.ParameterDefinition.getDisplayName
Syntax
Gets the displayName for this ParameterDefinition.
Returns
Example
To store the displayed name for the parameter definition paramdef in a variable called displayname, use code similar to the following:
actuate.parameter.ParameterDefinition.getGroup
Syntax
Gets the group for this ParameterDefinition, indicating if it is a member of a group.
Returns
Example
To print the group name for the parameter definition paramdef to the current document, use code similar to the following:
actuate.parameter.ParameterDefinition.getHelpText
Syntax
Gets the helpText for this ParameterDefinition.
Returns
Example
To store the help text for the parameter definition paramdef in a variable called helptext, use code similar to the following:
actuate.parameter.ParameterDefinition.getName
Syntax
Gets the name for this ParameterDefinition.
Returns
Example
To store the name for the parameter definition paramdef in a variable called paramname, use code similar to the following:
actuate.parameter.ParameterDefinition.
getOperatorListSyntax
Gets the operator list for this ParameterDefinition.
Returns
An array of Strings containing the select value list.
Example
To store the list of operators for the parameter definition paramdef in a variable called ops, use code similar to the following:
actuate.parameter.ParameterDefinition.getPosition
Syntax
Gets the position in the array for this ParameterDefinition.
Returns
Example
To store the position of the parameter definition paramdef in a variable called position, use code similar to the following:
actuate.parameter.ParameterDefinition.getSelectNameValueList
Syntax
Gets the selectNameValueList for this ParameterDefinition. This list applies if the parameter is set with a selection list.
Returns
Array of actuate.parameter.NameValuePair objects.
Example
To retrieve the name-value pair list for the parameter definition paramdef and put it into a new array, use code similar to the following:
namevalues = paramdef.getSelectNameValueList( ).slice( );actuate.parameter.ParameterDefinition.getSelectValueList
Syntax
Gets the selectValueList for this ParameterDefinition. This list applies when the parameter is set with a selection list.
Returns
Example
To retrieve the list of values selectable for the parameter definition paramdef and put it into a new array, use code similar to the following:
selectvalues = paramdef.getSelectValueList( ).slice( );actuate.parameter.ParameterDefinition.isAdHoc
Syntax
Gets the isAdHoc for this ParameterDefinition.
Returns
Boolean. True indicates that this parameter is an ad hoc parameter.
Example
To set the default value to null for the parameter definition paramdef if it is an ad hoc parameter, use code similar to the following:
actuate.parameter.ParameterDefinition.isHidden
Syntax
Gets the isHidden value for this ParameterDefinition.
Returns
Boolean. True indicates that this parameter is hidden.
Example
To reveal a parameter with the parameter definition paramdef if it is hidden, use code similar to the following:
actuate.parameter.ParameterDefinition.isPassword
Syntax
Gets the isPassword value for this ParameterDefinition.
Returns
Boolean. True indicates that the parameter is a password.
Example
To set the parameter definition paramdef as required if it is a password parameter, use code similar to the following:
actuate.parameter.ParameterDefinition.isRequired
Syntax
Gets the isRequired value for this ParameterDefinition.
Returns
Boolean. True indicates that the parameter is required.
Example
To set specific help text for the parameter definition paramdef if it is a required parameter, use code similar to the following:
actuate.parameter.ParameterDefinition.isViewParameter
Syntax
Gets the isViewParameter value for this ParameterDefinition. True indicates that the parameter is a view-time parameter. False indicates that the parameter is a run-time parameter.
Returns
Example
To set specific help text for the parameter definition paramdef if it is a view-time parameter, use code similar to the following:
actuate.parameter.ParameterDefinition.setAutoSuggestThreshold
Syntax
Sets the autosuggest threshold for this ParameterDefinition. The autosuggest threshold determines the number of characters a user types in before they are given suggestions from autosuggest.
Parameters
Example
To always show the autosuggest dialog for the parameter definition paramdef, use code similar to the following:
actuate.parameter.ParameterDefinition.setCascadingParentName
Syntax
void ParameterDefinition.setCascadingParentName(string cascadingParentName)Sets the cascadingParentName for this ParameterDefinition. This sets another parameter as this parameter’s parent.
Parameters
Example
To set the parent name of the parameter definition paramdef to Clark, use code similar to the following:
actuate.parameter.ParameterDefinition.setColumnName
Syntax
Sets the columnName for this ParameterDefinition. Used for queries.
Parameters
Example
To set the parameter definition paramdef to access the ProductName column, use code similar to the following:
actuate.parameter.ParameterDefinition.setColumnType
Syntax
Sets the columnType for this ParameterDefinition. Used for queries.
Parameters
String. Possible values are: "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", and "Unknown".
Example
To allow the parameter definition paramdef to interpret a column as untyped data, use code similar to the following:
actuate.parameter.ParameterDefinition.setControlType
Syntax
Sets the control type of this ParameterDefinition.
Parameters
String. Possible values are null, "", "AutoSuggest", "ControlRadioButton", "ControlList", "ControlListAllowNew", and "ControlCheckBox".
Example
To set the parameter definition paramdef to access the ProductName column, use code similar to the following:
actuate.parameter.ParameterDefinition
.setCurrentDisplayNameSyntax
Sets the displayed name for this parameter.
Parameters
Example
To set the display name for the parameter definition paramdef to Year, use code similar to the following:
actuate.parameter.ParameterDefinition.setDataType
Syntax
Sets the dataType for this ParameterDefinition.
Parameters
String. Possible values are: "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", "Unknown"
Example
To set the parameter definition paramdef data type to date, use code similar to the following:
actuate.parameter.ParameterDefinition.setDefaultValue
Syntax
Sets the default value for this ParameterDefinition.
Parameters
Example
To set the default value of parameter definition paramdef to 2010, use code similar to the following:
actuate.parameter.ParameterDefinition.setDefaultValueIsNull
Syntax
When True, sets the default value for this ParameterDefinition to null. Sets the default value to no value in all other cases.
Parameters
Example
To set the default value of parameter definition paramdef to null use code similar to the following:
actuate.parameter.ParameterDefinition.setDisplayName
Syntax
Sets the name to display on the parameter page for this ParameterDefinition.
Parameters
Example
To set the displayed name of parameter definition paramdef to Year, use code similar to the following:
actuate.parameter.ParameterDefinition.setGroup
Syntax
Sets the group value for this ParameterDefinition.
Parameters
Example
To assign the parameter definition paramdef to the "Customer Details" parameter group, use code similar to the following:
actuate.parameter.ParameterDefinition.setHelpText
Syntax
Sets the helpText value for this ParameterDefinition.
Parameters
Example
To set specific help text for the parameter definition paramdef if it is a required parameter, use code similar to the following:
actuate.parameter.ParameterDefinition.setIsAdHoc
Syntax
Sets this parameter as an ad hoc parameter.
Parameters
Boolean. True sets this parameter to ad hoc.
Example
To enable the parameter definition paramdef to accept an ad hoc value, use code similar to the following:
actuate.parameter.ParameterDefinition.setIsHidden
Syntax
Parameters
Boolean. True hides the parameter.
Example
To hide a parameter defined by a parameter definition called paramdef, use code similar to the following:
actuate.parameter.ParameterDefinition.setIsMultiSelectControl
Syntax
Sets the parameter to accept multiple selected values.
Parameters
Boolean. True allows multiple selected values to be set for this parameter.
Example
To allow a parameter defined by a parameter definition called paramdef to accept multiple selected values, use code similar to the following:
actuate.parameter.ParameterDefinition.setIsPassword
Syntax
Sets this parameter to treat its value as a password, which hides the input on the page and encrypts the value.
Parameters
Boolean. True indicates a password value.
Example
To set the parameter type accepted by the parameter definition paramdef to password, use code similar to the following:
actuate.parameter.ParameterDefinition.setIsRequired
Syntax
Sets the parameter to required.
Parameters
Boolean. True indicates a mandatory parameter.
Example
To make the parameter defined by the parameter definition paramdef mandatory, use code similar to the following:
actuate.parameter.ParameterDefinition.setIsViewParameter
Syntax
Sets the isViewParameter value for this ParameterDefinition.
Parameters
Example
To make the parameter defined by the parameter definition paramdef a view-time parameter, use code similar to the following:
actuate.parameter.ParameterDefinition.setName
Syntax
Sets the name to use internally for this ParameterDefinition.
Parameters
Example
To set the internal name of the parameter definition paramdef to Year, use code similar to the following:
actuate.parameter.ParameterDefinition.setPosition
Syntax
Sets the position value for this ParameterDefinition. The index indicates the position in the array of the ParameterDefinition.
Parameters
Example
To shift the parameter definition paramdef down on position in the parameter array, use code similar to the following:
actuate.parameter.ParameterDefinition.setSelectNameValueList
Syntax
void ParameterDefinition.setSelectNameValueList
(actuate.parameter.NameValuePair[ ] selectNameValueList)Sets the selectNameValueList value for this ParameterDefinition.
Parameters
Array of actuate.parameter.NameValuePair objects.
Example
To set the parameter definition paramdef to select the same name-value list as the parameter definition nparam, use code similar to the following:
actuate.parameter.ParameterDefinition.setSelectValueList
Syntax
Sets the selectValueList value for this ParameterDefinition.
Parameters
Example
To set the parameter definition paramdef to select the values 2007-2009, use code similar to the following:
(c) Copyright Actuate Corporation 2011 |
![]() |