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:
- ojtable/FlattenedTreeRowSet.js, line 10
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:
- ojtable/FlattenedTreeRowSet.js, line 74
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:
- ojtable/FlattenedTreeRowSet.js, line 97
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:
- ojtable/FlattenedTreeRowSet.js, line 113
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:
- ojtable/FlattenedTreeRowSet.js, line 127
-
#expand(rowKey)
-
Expand the specified row.
Parameters:
Name Type Description rowKey
Object the key of the row to expand - Source:
- ojtable/FlattenedTreeRowSet.js, line 140
-
#fetch(options)
-
Fetch the RowSet data.
Parameters:
Name Type Argument Description options
Object <optional>
Options to control fetch - Source:
- ojtable/FlattenedTreeRowSet.js, line 154
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:
- ojtable/FlattenedTreeRowSet.js, line 190
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:
- ojtable/FlattenedTreeRowSet.js, line 204
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:
- ojtable/FlattenedTreeRowSet.js, line 222
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:
- ojtable/FlattenedTreeRowSet.js, line 26
-
#isEmpty() → {boolean}
-
Determine if the RowSet has any Rows
- Source:
- ojtable/FlattenedTreeRowSet.js, line 237
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:
- ojtable/FlattenedTreeRowSet.js, line 275
-
#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:
- ojtable/FlattenedTreeRowSet.js, line 252
-
#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:
- ojtable/FlattenedTreeRowSet.js, line 298
-
#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:
- ojtable/FlattenedTreeRowSet.js, line 312
-
#size() → {number}
-
Return the length of the RowSet
- Source:
- ojtable/FlattenedTreeRowSet.js, line 325
Returns:
length of the RowSet- Type
- number
-
#sort(options)
-
Sort the Rows in the RowSet
Parameters:
Name Type Argument Description options
Object <optional>
- Source:
- ojtable/FlattenedTreeRowSet.js, line 339
-
#startIndex() → {number}
-
Return current start index.
- Source:
- ojtable/FlattenedTreeRowSet.js, line 352
Returns:
start index- Type
- number
-
#totalSize() → {number}
-
Return the total length of the RowSet
- Source:
- ojtable/FlattenedTreeRowSet.js, line 364
Returns:
length of the RowSet- Type
- number