Caplin Trader 5.1.0

Class: module:br-presenter/node/Option

module:br-presenter/node/Option(sValue, sLabel, bEnabled)

new module:br-presenter/node/Option(sValue, sLabel, bEnabled)

A single option held within an module:br-presenter/node/OptionsNodeList instance.

Extends:
Parameters:
Name Type Description
sValue String

The (logical) value of the option.

sLabel String

The label that is displayed on the screen.

bEnabled Boolean

Is the option enabled or disabled (enabled by default).

Extends

Members

enabled :String

If option is enabled

Type:
  • String

label :String

The textual label associated with the option.

Type:
  • String

value :String

The value of the option.

Type:
  • String

Methods

getPath()

Returns the path that would be required to bind this node from the view.

This method is used internally, but might also be useful in allowing the dynamic construction of views for arbitrary presentation models.

Inherited From:

nodes(sNodeName, vProperties)

Returns all nested nodes matching the search criteria reachable from this node.

Care is taken not to search up the tree in cyclic presentation models (where some of the presentation nodes have back references to presentation nodes higher up in the tree).

Parameters:
Name Type Description
sNodeName String

The name of nodes to match.

vProperties Object

Only nodes having this array or map of properties will be matched.

Inherited From:
See:

properties(sPropertyName, vValue)

Returns all nested properties matching the search criteria reachable from this node.

Care is taken not to search up the tree in cyclic presentation models (where some of the presentation nodes have back references to presentation nodes higher up in the tree).

Parameters:
Name Type Description
sPropertyName String

The name of properties to match.

vValue Object

The value of properties to match.

Inherited From:
See:

removeAllListeners()

Inherited From:
Deprecated:
  • This method has been replaced by #removeChildListeners which recurses the node tree. Removes all listeners attached to the properties contained by this PresentationNode.

removeChildListeners()

Removes all listeners attached to the properties contained by this PresentationNode, and any nodes it contains.

Inherited From:

toString()

Returns the option label.