Class: TableDataSource

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

E54107-01

QuickNav

oj. TableDataSource

Abstract object representing data used by table component

Constructor

new TableDataSource(data, options)

Parameters:
Name Type Description
data Object data supported by the components
options Object | null Array of options for the TableDataSource
Source:

Methods

#at(index) → {Object}

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

#fetch(options)

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

Source:
Throws:
Type
Error

#get(id) → {Object}

Return the first oj.Row object from the RowSet whose Row id value is the given id
Parameters:
Name Type Description
id Object | string ID for which to return the Row object, if found.
Source:
Throws:
Type
Error
Returns:
First Row object in the RowSet where Row.id = id. If none are found, returns null.
Type
Object

#getCapability(feature) → {string|null}

Determines whether this TableDataSource supports certain feature.
Parameters:
Name Type Description
feature string the feature in which its capabilities is inquired. Currently the only valid feature is "sort".
Source:
Returns:
the name of the feature. For "sort", the valid return values are: "full", "none". Returns null if the feature is not recognized.
Type
string | null

#hasMore() → {boolean}

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

#indexOf(row) → {number}

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

#Init()

Initializes the instance.
Source:

#size() → {number}

Get the length of the RowSet. limit it.
Source:
Returns:
length of the RowSet
Type
number

#sort(criteria)

Performs a sort on the data source.
Parameters:
Name Type Description
criteria Object the sort criteria.
Properties
Name Type Description
key Object The key that identifies which field to sort
direction string the sort direction, valid values are "ascending", "descending", "none" (default)
Source:

#startIndex(startIndex) → {number}

Get or set the current start index.
Parameters:
Name Type Description
startIndex number 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