Class: NodeSetWrapper

Oracle® JavaScript Extension Toolkit (JET)
3.2.0

E87541-01

QuickNav

oj. NodeSetWrapper

Version:
  • 3.2.0

Constructor

new NodeSetWrapper(nodeSet, metadataCallback, range, collapsedKeys)

Wraps around the NodeSet to provide additional metadata
Parameters:
Name Type Argument Description
nodeSet Object the node set to wrap
metadataCallback function(Object, Object) callback to inject additional metadata information
range Object <optional>
the requested range
collapsedKeys Array <optional>
an array of the collapsedKeys that should be passed in the expandAll case only
Source:

Methods

getChildNodeSet(index) → {Object|null}

Gets the node set child of the specified index.
Parameters:
Name Type Description
index number the index of the node/row in which we want to retrieve the child node set
Source:
Returns:
the child node set representing the child tree data.
Type
Object | null

getCount() → {number}

Gets the actual count of the result set.
Source:
Returns:
the actual count of the result set.
Type
number

getData(index) → {Object}

Gets the data of the specified index. An error is throw when 1) the range is not yet available and 2) the index specified is out of bounds.
Parameters:
Name Type Description
index number the index of the node/row in which we want to retrieve the data from.
Source:
Returns:
the data for the specified index.
Type
Object

getMetadata(index) → {Object}

Gets the metadata of the specified index. An error is throw when 1) the range is not yet available and 2) the index specified is out of bounds. The metadata that the data source must return are: 1) key - Object, the key of the node/row. 2) state - state of the node, valid values are 'expanded', 'collapsed', 'leaf'. 3) depth - number, the depth of the node/row.
Parameters:
Name Type Description
index number the index of the node/row in which we want to retrieve the metadata from.
Source:
Returns:
the metadata object for the specific index.
Type
Object

getParent() → {Object}

Gets the parent
Source:
Returns:
the key of the parent.
Type
Object

getStart() → {number}

Gets the start index of the result set.
Source:
Returns:
the start index of the result set.
Type
number