Class actuate.parameter.ConvertUtility
Description
actuate.parameter.ConvertUtility encodes multiple actuate.parameter.ParameterValue objects into an array of generic objects. For multi-value parameters, use the array of generic objects as the input parameter for actuate.Viewer.setParameterValues.
Constructor
Syntax
actuate.parameter.ConvertUtility(actuate.parameter.ParameterValue[ ] aParamVals)
Constructs a new ConvertUtility object.
Parameter
aParamVals
Array of actuate.parameter.ParameterValue objects to convert.
Function summary
Table 11‑6 lists actuate.parameter.ConvertUtility functions.
Table 11‑6 actuate.parameter.ConvertUtility functions 
Function
Description
convert( )
Converts the ParameterValues to an array of generic objects
convertData( )
Converts locale-neutral parameter values to the user’s login locale
getParameterMap( )
Returns the ParameterValues as an associative array
getParameterValues( )
Returns an array of ParameterValues
actuate.parameter.ConvertUtility.convert
Syntax
void ConvertUtility.convert(function callback)
Converts ParameterValues into an array of generic objects. The callback function takes the array as an argument.
Parameter
callback
Function. The callback function to call after converting the results. The callback function must take the generic array of objects as an argument.
Example
This example stores the name-value pair array for myParamValues in a variable called nameValueArray:
var nameValueArray = new Array( );
var converter = new actuate.ConvertUtility(myParamValues)
converter.convert(callback);
function callback (values){
nameValueArray = values;
}
actuate.parameter.ConvertUtility.getParameterMap
Syntax
object ConvertUtility.getParameterMap( )
Returns the parameters as an associative array. This function makes the name of each parameter an object property and sets the value of that property to the associated parameter value.
Returns
Object.
Example
This example stores the associative array for myParamValues in a variable called nameValueArray:
var paramMap = new Object( );
var converter = new actuate.ConvertUtility(myParamValues)
paramMap = converter.getParameterMap( );
actuate.parameter.ConvertUtility.getParameterValues
Syntax
actuate.parameter.ParameterValue[ ] ConvertUtility.getParameterValues( )
Returns the array of ParameterValue objects.
Returns
Array of actuate.parameter.ParameterValue objects.
Example
This example stores the array of ParameterValue objects for myParamValues in a variable called paramValues:
var paramValues = new Array( );
var converter = new actuate.ConvertUtility(myParamValues)
paramValues = converter.getParameterMap( );