Class: FlattenedTreeRowSet

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

E54107-01

QuickNav

oj. FlattenedTreeRowSet

RowSet wrapper for FlattenedTreeDataSource

Constructor

new FlattenedTreeRowSet(data, options)

Parameters:
Name Type Argument Description
data oj.FlattenedTreeDataSource oj.FlattenedTreeDataSource
options Object <optional>
Passed through to the user's initialize routine, if any, upon construction
Source:

Methods

#add(row, options) → {Object}

Add an instance of this RowSet's Row(s) to the end of the RowSet.
Parameters:
Name Type Argument Description
row oj.Row Row object
options Object <optional>
at: splice the new Row into the RowSet at the value given (at:index)

deferred: if true, return a promise as though this RowSet were virtual whether it is or not

Source:
Returns:
if deferred or virtual, return a promise when the set has completed
Type
Object

#at(index, options) → {Object}

Return the Row object found at the given index of the RowSet, or a promise object that will return the Row to a function in the done() call.
Parameters:
Name Type Argument Description
index number Index for which to return the Row object.
options Object <optional>

fetchSize: fetch size to use if the call needs to fetch more records from the server, if virtualized. Overrides the overall fetchSize setting

deferred: if true, return a deferred/promise object as described below. If not specified, the return value will be determined by whether or not the RowSet is virtual

Source:
Returns:
Row object located at index. If index is out of range, returns null. If this is a paging/virtual RowSet or if deferred is specified and true, at will return a jQuery promise object which will call its done function, passing the value at(index)
Type
Object

#clone() → {Object}

Return a copy of the RowSet
Source:
Returns:
copy of the RowSet
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)

Fetch the RowSet data.
Parameters:
Name Type Argument Description
options Object <optional>
Options to control fetch

Source:
Throws:
Type
Error

#get(id, options) → {Object}

Return the first Row object from the RowSet whose Row id value is the given id Note this method will not function as expected if the id is not set
Parameters:
Name Type Argument Description
id Object | string ID for which to return the Row object, if found.
options Object <optional>

fetchSize: fetch size to use if the call needs to fetch more records from the server, if virtualized. Overrides the overall fetchSize setting

deferred: if true, return a promise as though this RowSet were virtual whether it is or not

Source:
Returns:
First Row object in the RowSet where Row.id = id. If none are found, returns null. If deferred or virtual, return a promise passing the Row when done
Type
Object

#hasMore() → {boolean}

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

#indexOf(row, options) → {number}

Return the array index location of the given Row object.
Parameters:
Name Type Argument Description
row Object Row object to locate
options Object <optional>
deferred: if true, return a promise as though this RowSet were virtual whether it is or not
Source:
Returns:
The index of the given Row object, or a promise that will call with the index when complete. If the object is not found, returns -1.
Type
number

#Init()

Initializes the data source.
Source:

#isEmpty() → {boolean}

Determine if the RowSet has any Rows
Source:
Returns:
true if RowSet is empty
Type
boolean

#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:

#remove(row, options)

Remove a Row from the RowSet, if found.
Parameters:
Name Type Argument Description
row oj.Row Row object
options Object <optional>
silent: if set, do not fire a remove event
Source:

#reset(data, options)

Remove and replace the RowSet's entire list of Rows with a new set of Rows, if provided. Otherwise, empty the RowSet.
Parameters:
Name Type Argument Description
data Object <optional>
Array of Row objects with which to replace the RowSet's data.
options Object <optional>
user options, passed to event
Source:

#size() → {number}

Return the length of the RowSet
Source:
Returns:
length of the RowSet
Type
number

#sort(options)

Sort the Rows in the RowSet
Parameters:
Name Type Argument Description
options Object <optional>
Source:

#startIndex() → {number}

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

#totalSize() → {number}

Return the total length of the RowSet
Source:
Returns:
length of the RowSet
Type
number