Constructor
new module:br/presenter/node/MappedNodeList(mPresentationNodes, fNodeClass)
Extends:
Parameters:
| Name | Type | Description |
|---|---|---|
mPresentationNodes |
Map | The initial map of module:br/presenter/node/PresentationNode instances. |
fNodeClass |
function | (optional) The class/interface that all nodes in this list should be an instance of. |
Extends
Methods
-
addListener(oListener, bNotifyImmediately)
-
Add a
module:br/presenter/node/NodeListListenerthat will be notified each time the node list is updated.Parameters:
Name Type Description oListenermodule:br/presenter/node/NodeListListener The listener to be added. bNotifyImmediatelyboolean Whether to invoke the listener immediately using the current node list. - Inherited From:
- Source:
-
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.
-
getPresentationNodesArray()
-
Returns the list of
module:br/presenter/node/PresentationNodeinstances as an array. -
getPresentationNodesMap()
-
Returns the string-to-node mapping. Treat as immutable.
-
getTemplateForNode(oPresentationNode)
-
Returns the name of the template used to render the given presentation node.
Parameters:
Name Type Description oPresentationNodemodule:br/presenter/node/PresentationNode The presentation node being queried. - Inherited From:
- Source:
-
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()
-
Remove all previously added
module:br/presenter/node/NodeListListenerinstances.- Inherited From:
- Source:
-
removeChildListeners()
-
Removes all listeners attached to the properties contained by this
PresentationNode, and any nodes it contains. -
removeListener(oListener)
-
Remove a previously added
module:br/presenter/node/NodeListListener.Parameters:
Name Type Description oListenermodule:br/presenter/node/NodeListListener The listener being removed. - Inherited From:
- Source:
-
updateList(mPresentationNodes)
-
Updates the node list with a new Map of
module:br/presenter/node/PresentationNodeinstances.Care must be taken to always invoke this method when the contents of the node list change. The array returned by
#getPresentationNodesArrayshould be treated as being immutable.Parameters:
Name Type Description mPresentationNodesArray The new map of module:br/presenter/node/PresentationNodeinstances.