Class actuate.parameter.NameValuePair
Description
The NameValuePair object contains a display name associated with a value. The actuate.parameterDefinition.setSelectNameValueList( ) function takes an array of actuate.parameter.NameValuePair objects to use in a selection list. In this way, a ParameterDefinition can display a list of names and map them to values used internally. For example, set the name "My Default Country" for a NameValuePair to display "My Default Country" in the drop-down list in the interface, and set the value to "United States" internally for a US user.
Constructor
Syntax
actuate.parameter.NameValuePair(string name, string value)
Constructs a new NameValuePair object.
Parameters
name
String. The name to display in the selection list.
value
String. The value that selecting the name sets internally.
Function summary
Table 4-22 lists actuate.parameter.NameValuePair functions.
actuate.parameter.NameValuePair.getName
Syntax
string NameValuePair.getName( )
Returns the name for this NameValuePair.
Returns
String.
Example
This sample code returns the name component of the myNVPair NameValuePair object:
alert("Name component is " + myNVPair.getName( ));
actuate.parameter.NameValuePair.getValue
Syntax
string NameValuePair.getValue( )
Returns the value for this NameValuePair.
Returns
String.
Example
This sample code returns the value component of the myNVPair NameValuePair object:
alert("Value component is " + myNVPair.getValue( ));
actuate.parameter.NameValuePair.setName
Syntax
void NameValuePair.setName(string name)
Sets the name for the NameValuePair.
Parameters
name
String.
Example
This sample code sets the name component of the myNVPair NameValuePair object to "My hometown":
myNVPair.setName("My hometown");
actuate.parameter.NameValuePair.setValue
Syntax
void NameValuePair.setValue(string value)
Sets the value for the NameValuePair.
Parameters
value
String.
Example
This sample code sets the value component of the myNVPair NameValuePair object to "Cleveland":
myNVPair.setValue("Cleveland");

Additional Links:

Copyright Actuate Corporation 2012