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 44‑22 lists actuate.parameter.NameValuePair functions.
Table 44‑22 actuate.parameter.NameValuePair functions
Function
Description
Gets the name for this NameValuePair
Gets the value for this NameValuePair
Sets the name for this NameValuePair
Sets the value for this 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( ));
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( ));
setName
Syntax
void NameValuePair.setName(string name)
Sets the name for the NameValuePair.
Parameter
name
String.
Example
This sample code sets the name component of the myNVPair NameValuePair object to "My hometown":
myNVPair.setName("My hometown");
setValue
Syntax
void NameValuePair.setValue(string value)
Sets the value for the NameValuePair.
Parameter
value
String.
Example
This sample code sets the value component of the myNVPair NameValuePair object to "Cleveland":
myNVPair.setValue("Cleveland");