Param

Class representation of a Controller Param instance.  Param object provides methods for getting, setting, and validating parameters, as well as can be observed in a Controller.

Summary
Class representation of a Controller Param instance.
Creates an instance of the mojo.controller.Param class.
Returns the name of the parameter.
Returns the value of the parameter.
Sets the value of the parameter, and fires the onChange event if the value has changed.
Returns the default value of the parameter.
Returns whether or not the parameter is required.
Returns the data type of the parameter
This event fires when the parameter value has changed.

Functions

constructor

constructor: function(name,
defaultValue,
required,
type,
paramsRootObj)

Creates an instance of the mojo.controller.Param class.

Parameters

name{string}
defaultValue{object}
required{boolean}
type{type}
paramsRootObj{object}

getName

getName: function()

Returns the name of the parameter.

Returns

{string} name

getValue

getValue: function()

Returns the value of the parameter.

Returns

{object} value

setValue

setValue: function(value)

Sets the value of the parameter, and fires the onChange event if the value has changed.

Parameters

value{object}

getDefaultValue

getDefaultValue: function()

Returns the default value of the parameter.

Returns

{object} value

getRequired

getRequired: function()

Returns whether or not the parameter is required.

Returns

{boolean} required

getType

getType: function()

Returns the data type of the parameter

Returns

{type} type

Events

onChange

This event fires when the parameter value has changed.

constructor: function(name,
defaultValue,
required,
type,
paramsRootObj)
Creates an instance of the mojo.controller.Param class.
getName: function()
Returns the name of the parameter.
getValue: function()
Returns the value of the parameter.
setValue: function(value)
Sets the value of the parameter, and fires the onChange event if the value has changed.
getDefaultValue: function()
Returns the default value of the parameter.
getRequired: function()
Returns whether or not the parameter is required.
getType: function()
Returns the data type of the parameter