Constructor
new module:br-presenter /node /Multi Selection Field(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 |
vValues |
Object | (optional) The list of currently selected options, either using an array or as a |
Extends
Members
control Name :br-presenter /property /Writable Property
The logical control-name the multi-selection 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 /Writable Property
enabled :br-presenter /property /Writable Property
A boolean property representing whether the multi-selection field is enabled or not.
Type:
-
br-presenter
/property /Writable Property
failure Message :br-presenter /property /Writable Property
A textual description of the currently failing validation message when #hasError
is true
.
Type:
-
br-presenter
/property /Writable Property
has Error :br-presenter /property /Writable Property
A boolean property that is true
if #value
has any validation errors, and false
otherwise.
Type:
-
br-presenter
/property /Writable Property
label :br-presenter /property /Writable Property
The textual label associated with the multi-selection field.
Type:
-
br-presenter
/property /Writable Property
options :br-presenter /node /Options Node List
The current list of options the user can select from.
Type:
-
br-presenter
/node /Options Node List
value :br-presenter /property /Writable Property
The list of currently selected options.
Type:
-
br-presenter
/property /Writable Property
visible :br-presenter /property /Writable Property
A boolean property representing whether the multi-selection field is visible or not.
Type:
-
br-presenter
/property /Writable Property
Methods
allow Invalid Selections(bAllow Invalid Selections)
Whether the multi-selection field displays a validation error if the selected values (within #value
)
contain items that are not members of the #options
array.
Invalid selections cause validation errors by default, but this rarely happens
with multi-selection fields since #value
automatically updates if the underlying
#options
change by default, and standard multi-selection controls don't allow
unconstrained user input.
Parameters:
Name | Type | Description |
---|---|---|
bAllowInvalidSelections |
boolean | Invalid selections are allowed when set to |
automatically Update Value When Options Change(bAutomatically Update)
Whether the selection field automatically picks a new #value
when the underlying #options
change.
If the underlying #options
change, so that #value
still 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 #value
may 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 |
---|---|---|
bAutomaticallyUpdate |
boolean | True to automatically update values |
get Path()
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(sNode Name, 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(sProperty Name, 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:
remove All Listeners()
- 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
remove Child Listeners()
Removes all listeners attached to the properties contained by this PresentationNode
, and any nodes it contains.
- Inherited From: