Class
caplin.presenter.node

PresentationNode

Base class of all complex objects (nodes) within a presentation model.

A caplin.presenter.PresentationModel is a tree of PresentationNode instances, with instances of caplin.presenter.property.Property and Function forming the leafs of the tree. Objects that do not extend PresentationNode are not considered to be part of the presentation model, and are not accessible within the view.

Constructor Summary

Attributes Name and Description
caplin.presenter.node.PresentationNode()

Constructs a new instance of PresentationNode.

Method Summary

Attributes Name and Description
String getPath()

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

caplin.presenter.node.Nodes nodes(String sNodeName, Object vProperties)

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

caplin.presenter.property.Properties properties(String sPropertyName, Object vValue)

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

void removeAllListeners()

void removeChildListeners()

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

Constructor Detail

caplin.presenter.node.PresentationNode()

Constructs a new instance of PresentationNode.

Method Detail

String 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.

caplin.presenter.node.Nodes nodes(String sNodeName, Object 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
String sNodeName The name of nodes to match.
Object vProperties Only nodes having this array or map of properties will be matched.
See
#properties

caplin.presenter.property.Properties properties(String sPropertyName, Object 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
String sPropertyName The name of properties to match.
Object vValue The value of properties to match.
See
#nodes

void removeAllListeners()

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

void removeChildListeners()

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