Caplin Trader 4.7.1

Class: module:br/presenter/node/Field

module:br/presenter/node/Field

A PresentationNode containing all of the attributes necessary to model an input field on screen.

Constructor

new module:br/presenter/node/Field(vValue)

Extends:
Parameters:
Name Type Description
vValue Object (optional) The initial value of the field, either using a primitive type or as a module:br/presenter/property/EditableProperty.

Extends

Members

controlName :br.presenter.property.WritableProperty

The logical control-name the field is being bound to — this value will appear within the name attribute if being bound to a native HTML control.
Type:
  • br.presenter.property.WritableProperty

enabled :br.presenter.property.WritableProperty

A boolean property representing whether the input field is enabled or not.
Type:
  • br.presenter.property.WritableProperty

failureMessage :br.presenter.property.WritableProperty

A textual description of the currently failing validation message when #hasError is true.
Type:
  • br.presenter.property.WritableProperty

hasError :br.presenter.property.WritableProperty

A boolean property that is true if #value has any validation errors, and false otherwise.
Type:
  • br.presenter.property.WritableProperty

label :br.presenter.property.WritableProperty

The textual label associated with the input field.
Type:
  • br.presenter.property.WritableProperty

pending :br.presenter.property.WritableProperty

A boolean property that is true if #value is waiting for validation, and false otherwise.
Type:
  • br.presenter.property.WritableProperty

value :br.presenter.property.EditableProperty

The current value displayed within the input field.
Type:
  • br.presenter.property.EditableProperty

visible :br.presenter.property.WritableProperty

A boolean property representing whether the input field is visible or not.
Type:
  • br.presenter.property.WritableProperty

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: