Constructor
new module:br/presenter/node/MultiSelectionField(vOptions, vValues)
Extends:
Parameters:
| Name | Type | Description |
|---|---|---|
vOptions |
Object | The list of available options, either using an array, a map of strings or as a module:br/presenter/node/OptionsNodeList. |
vValues |
Object | (optional) The list of currently selected options, either using an array or as a module:br/presenter/property/EditableProperty containing an array. |
Extends
Members
-
controlName :br.presenter.property.WritableProperty
-
The logical control-name the multi-selection field is being bound to — this value will appear within the
nameattribute if being bound to a native HTML control.Type:
- br.presenter.property.WritableProperty
-
enabled :br.presenter.property.WritableProperty
-
A boolean property representing whether the multi-selection 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
#hasErroristrue.Type:
- br.presenter.property.WritableProperty
-
hasError :br.presenter.property.WritableProperty
-
A boolean property that is
trueif#valuehas any validation errors, andfalseotherwise.Type:
- br.presenter.property.WritableProperty
-
label :br.presenter.property.WritableProperty
-
The textual label associated with the multi-selection field.
Type:
- br.presenter.property.WritableProperty
-
options :br.presenter.node.OptionsNodeList
-
The current list of options the user can select from.
Type:
- br.presenter.node.OptionsNodeList
-
value :br.presenter.property.WritableProperty
-
The list of currently selected options.
Type:
- br.presenter.property.WritableProperty
-
visible :br.presenter.property.WritableProperty
-
A boolean property representing whether the multi-selection field is visible or not.
Type:
- br.presenter.property.WritableProperty
Methods
-
allowInvalidSelections(bAllowInvalidSelections)
-
Whether the multi-selection field displays a validation error if the selected values (within
#value) contain items that are not members of the#optionsarray.Invalid selections cause validation errors by default, but this rarely happens with multi-selection fields since
#valueautomatically updates if the underlying#optionschange by default, and standard multi-selection controls don't allow unconstrained user input.Parameters:
Name Type Description bAllowInvalidSelectionsboolean Invalid selections are allowed when set to true. -
automaticallyUpdateValueWhenOptionsChange(bAutomaticallyUpdate)
-
Whether the selection field automatically picks a new
#valuewhen the underlying#optionschange.If the underlying
#optionschange, so that#valuestill refers to options that no longer exist, a validation error would be displayed if it were not for the fact that invalid selections are automatically removed by default when this happens. Automatically updating the#valuemay not be desirable in all cases, and it may preferable instead to display a validation error so the user can be made fully aware that their selection requires change.Parameters:
Name Type Description bAutomaticallyUpdateboolean True to automatically update values -
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.
-
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 sNodeNameString The name of nodes to match. vPropertiesObject Only nodes having this array or map of properties will be matched. - Inherited From:
- Source:
- 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 sPropertyNameString The name of properties to match. vValueObject The value of properties to match. - Inherited From:
- Source:
- 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.
- This method has been replaced by #removeChildListeners which recurses the node tree.
Removes all listeners attached to the properties contained by this
- Source:
-
removeChildListeners()
-
Removes all listeners attached to the properties contained by this
PresentationNode, and any nodes it contains.