Class: FlattenedTreeTableDataSource

Oracle® Fusion Middleware Oracle JavaScript Extension Toolkit (JET)
12c (12.1.4)

E54107-01

QuickNav

oj. FlattenedTreeTableDataSource

Object representing data used by the rowexpander component

Constructor

new FlattenedTreeTableDataSource(data, options)

Parameters:
Name Type Description
data Object
options Object | null Array of options for the TreeTableDataSource
Source:

Methods

#at(index) → {Object}

Return the model object found at the given index of the collection.
Parameters:
Name Type Description
index number Index for which to return the model object.
Source:
Throws:
Type
Error
Returns:
Model object located at index. If index is out of range, returns null.
Type
Object

#collapse(rowKey)

Collapse the specified row.
Parameters:
Name Type Description
rowKey Object the key of the row to collapse
Source:

#expand(rowKey)

Expand the specified row.
Parameters:
Name Type Description
rowKey Object the key of the row to expand
Source:

#fetch(options)

Calls fetch on the datasource.
Parameters:
Name Type Argument Description
options Object <optional>
Options to control fetch

Source:
Throws:
Type
Error

#get(id) → {Object}

Return the first model object from the collection whose model id value is the given id or cid, or the id or cid from a passed in model
Parameters:
Name Type Description
id Object | string ID, cid, or Model (see Model id or cid) for which to return the model object, if found.
Source:
Throws:
Type
Error
Returns:
First model object in the collection where model.id = id or model.cid = id. If none are found, returns null.
Type
Object

#hasMore() → {boolean}

Return whether there is more data which can be fetched.
Source:
Returns:
whether there is more data
Type
boolean

#indexOf(model) → {number}

Return the array index location of the given model object.
Parameters:
Name Type Description
model Object Model object to locate
Source:
Throws:
Type
Error
Returns:
The index of the given model object. If the object is not found, returns -1.
Type
number

#Init()

Initializes the instance.
Source:

#off(eventType, eventHandler)

Detach an event handler from the datasource
Parameters:
Name Type Description
eventType string eventType supported by the datasource
eventHandler function(Object) event handler function
Source:

#on(eventType, eventHandler)

Attach an event handler to the datasource
Parameters:
Name Type Description
eventType string eventType supported by the datasource
eventHandler function(Object) event handler function
Source:

#size() → {number}

Return the size of the data locally in the dataSource. -1 if an initial fetch has not been done yet.
Source:
Returns:
size of data
Type
number

#sort(comparator, options)

Sort the models in the collection
Parameters:
Name Type Argument Description
comparator Object <optional>
options Object <optional>
silent: if true, do not fire the sort event
Source:
Throws:
Type
Error

#startIndex() → {number}

Return current start index.
Source:
Returns:
start index
Type
number

#totalSize() → {number}

Return the total size of data available, including server side if not local.
Source:
Returns:
total size of data
Type
number