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.Table 4-24 lists actuate.parameter.ParameterDefinition functions.actuate.parameter.ParameterDefinition.getAutoSuggestThresholdGets 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.To store the autosuggest threshold of the parameter definition paramdef in a variable called threshold, use code similar to the following:actuate.parameter.ParameterDefinition.getCascadingParentNameGets the cascadingParentName value for this ParameterDefinition. A cascading parent parameter is only used when one parameter depends upon another.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.getColumnNameGets the columnName value for this ParameterDefinition. This setting sets the column to retrieve data from for an ad hoc parameter that performs a query.To store the column name of the parameter definition paramdef in a variable called columnname, use code similar to the following:actuate.parameter.ParameterDefinition.getColumnTypeGets the columnType value for this ParameterDefinition. This setting sets the data type queried by an ad hoc parameter that performs a query.String. Possible values are: null, "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", and "Unknown".To store the column type of the parameter definition paramdef in a variable called columntype, use code similar to the following:actuate.parameter.ParameterDefinition.getControlTypeGets the controlType value for this ParameterDefinition. It determines the form element displayed for the user to set the parameter value.String. Possible values are: null, "", "ControlRadioButton", "ControlList", "ControlListAllowNew", and "ControlCheckBox".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.getCurrentDisplayNameTo store the current display name of the parameter definition paramdef in a variable called displayname, use code similar to the following:actuate.parameter.ParameterDefinition.getDataTypeString. Possible values are: "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", and "Unknown".To store the data type of the parameter definition paramdef in a variable called type, use code similar to the following:actuate.parameter.ParameterDefinition.getDefaultValueTo 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.getDefaultValueIsNullTo alert the user that the default value is null for the parameter definition paramdef, use code similar to the following:actuate.parameter.ParameterDefinition.getDisplayNameTo store the displayed name for the parameter definition paramdef in a variable called displayname, use code similar to the following:To print the group name for the parameter definition paramdef to the current document, use code similar to the following:actuate.parameter.ParameterDefinition.getHelpTextTo store the help text for the parameter definition paramdef in a variable called helptext, use code similar to the following:To store the name for the parameter definition paramdef in a variable called paramname, use code similar to the following:actuate.parameter.ParameterDefinition.getOperatorListTo store the list of operators for the parameter definition paramdef in a variable called ops, use code similar to the following:actuate.parameter.ParameterDefinition.getPositionTo store the position of the parameter definition paramdef in a variable called position, use code similar to the following:actuate.parameter.ParameterDefinition.getSelectNameValueListGets the selectNameValueList for this ParameterDefinition. This list applies if the parameter is set with a selection list.Array of actuate.parameter.NameValuePair objects.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.getSelectValueListGets the selectValueList for this ParameterDefinition. This list applies when the parameter is set with a selection list.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( );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:To reveal a parameter with the parameter definition paramdef if it is hidden, use code similar to the following:actuate.parameter.ParameterDefinition.isPasswordTo set the parameter definition paramdef as required if it is a password parameter, use code similar to the following:actuate.parameter.ParameterDefinition.isRequiredTo set specific help text for the parameter definition paramdef if it is a required parameter, use code similar to the following:actuate.parameter.ParameterDefinition.isViewParameterBoolean. True indicates that the parameter is a view-time parameter. False indicates that the parameter is a run-time parameter.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.setAutoSuggestThresholdSets 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.To always show the autosuggest dialog for the parameter definition paramdef, use code similar to the following:actuate.parameter.ParameterDefinition.setCascadingParentNamevoid ParameterDefinition.setCascadingParentName(string cascadingParentName)Sets the cascadingParentName for this ParameterDefinition. This sets another parameter as this parameter’s parent.To set the parent name of the parameter definition paramdef to "Clark", use code similar to the following:actuate.parameter.ParameterDefinition.setColumnNameTo set the parameter definition paramdef to access the ProductName column, use code similar to the following:actuate.parameter.ParameterDefinition.setColumnTypeString. Possible values are null, "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", and "Unknown".To allow the parameter definition paramdef to interpret a column as untyped data, use code similar to the following:actuate.parameter.ParameterDefinition.setControlTypeString. Possible values are null, "", "AutoSuggest", "ControlRadioButton", "ControlList", "ControlListAllowNew", and "ControlCheckBox".actuate.parameter.ParameterDefinition.setCurrentDisplayNameTo set the display name for the parameter definition paramdef to "Year", use code similar to the following:actuate.parameter.ParameterDefinition.setDataTypeString. Possible values are "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", and "Unknown".actuate.parameter.ParameterDefinition.setDefaultValueTo set the default value of parameter definition paramdef to "2010", use code similar to the following:actuate.parameter.ParameterDefinition.setDefaultValueIsNullWhen true, sets the default value for this ParameterDefinition to null. Sets the default value to no value in all other cases.To set the default value of parameter definition paramdef to null, use code similar to the following:actuate.parameter.ParameterDefinition.setDisplayNameTo set the displayed name of parameter definition paramdef to "Year", use code similar to the following:To assign the parameter definition paramdef to the "Customer Details" parameter group, use code similar to the following:actuate.parameter.ParameterDefinition.setHelpTextTo set specific help text for the parameter definition paramdef if it is a required parameter, use code similar to the following:actuate.parameter.ParameterDefinition.setIsAdHocTo enable the parameter definition paramdef to accept an ad hoc value, use code similar to the following:actuate.parameter.ParameterDefinition.setIsHiddenTo hide a parameter defined by a parameter definition called paramdef, use code similar to the following:actuate.parameter.ParameterDefinition.setIsMultiSelectControlTo allow a parameter defined by a parameter definition called paramdef to accept multiple selected values, use code similar to the following:actuate.parameter.ParameterDefinition.setIsPasswordSets this parameter to treat its value as a password, which hides the input on the page and encrypts the value.To set the parameter type accepted by the parameter definition paramdef to password, use code similar to the following:actuate.parameter.ParameterDefinition.setIsRequiredTo make the parameter defined by the parameter definition paramdef mandatory, use code similar to the following:actuate.parameter.ParameterDefinition.setIsViewParameterTo make the parameter defined by the parameter definition paramdef a view-time parameter, use code similar to the following:To set the internal name of the parameter definition paramdef to Year, use code similar to the following:actuate.parameter.ParameterDefinition.setPositionSets the position value for this ParameterDefinition. The index indicates the position in the array of the ParameterDefinition.To shift the parameter definition paramdef down on position in the parameter array, use code similar to the following:actuate.parameter.ParameterDefinition.setSelectNameValueListvoid ParameterDefinition.setSelectNameValueList
(actuate.parameter.NameValuePair[ ] selectNameValueList)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.setSelectValueListTo set the parameter definition paramdef to select the values 2007-2009, use code similar to the following:
|
|
Copyright Actuate Corporation 2012 |