The goog.ds.JsPropertyDataSource Class

goog.ds.JsPropertyDataSource
> goog.ds.BaseDataNode

goog.ds.JsPropertyDataSource(parent, dataName, opt_parentDataNode)

Data source for JavaScript properties that arent objects. Contains reference to parent object so that you can set the vaule

parent {goog.ds.DataNode}
Parent object.
dataName {string}
Name of this property.
opt_parentDataNode {goog.ds.DataNode=}
The parent data node. If omitted, assumes that the parent object is the parent data node.

.get()

Get the value of the node

returns {Object}
The value of the node, or null if no value.

.getChildNode(name, opt_canCreate)

Inherited from goog.ds.BaseDataNode .

Gets a named child node of the current node

name {string}
The node name.
opt_canCreate {boolean=}
Whether you can create the child node if it doesn't exist already.
returns {goog.ds.DataNode}
The child node, or null if no node of this name exists and opt_create is false.

.getChildNodeValue(name)

Inherited from goog.ds.BaseDataNode .

Gets the value of a child node

name {string}
The node name.
returns {Object}
The value of the node, or null if no value or the child node doesn't exist.

.getChildNodes(opt_selector)

Inherited from goog.ds.BaseDataNode .

Gets all of the child nodes of the current node. Should return an empty DataNode list if no child nodes.

opt_selector {string=}
String selector to choose child nodes.
returns {goog.ds.DataNodeList}
The child nodes.

.getDataName()

Get the name of the node relative to the parent node

returns {string}
The name of the node.

.getDataPath()

Inherited from goog.ds.BaseDataNode .

Gets the a qualified data path to this node

returns {string}
The data path.

.getLoadState()

Inherited from goog.ds.BaseDataNode .

Gets the state of the backing data for this node

returns {goog.ds.LoadState}
The state.

.load

Inherited from goog.ds.BaseDataNode .

Load or reload the backing data for this node

.set(value)

Set the value of the node

value {Object}
The new value of the node.