Constructor
new PagingDataGridDataSource(dataSource, options)
Parameters:
| Name | Type | Description |
|---|---|---|
dataSource |
oj.DataGridDataSource | null | |
options |
Object | null | Array of options for the PagingControlDataSource |
- Source:
Methods
-
#fetch(options)
-
Calls fetch on the datasource with paging options.
Parameters:
Name Type Argument Description optionsObject <optional>
Options to control fetch startIndex: The index at which to start fetching records.
pageSize: The number of records to be fetched.
- Inherited From:
- Source:
- ojpagingcontrol/PagingDataSource.js, line 40
Throws:
- Type
- Error
-
fetchCells(cellRanges, callbacks, callbackObjects)
-
Fetch a range of cells from the data source.
Parameters:
Name Type Argument Description cellRangesArray.<Object> Information about the cell range. A cell range is defined by an array of range info for each axis, where each range contains three properties: axis, start, count. Properties
Name Type Description axisstring the axis associated with this range where cells are fetched. Valid values are "row" and "column". startnumber the start index of the range for this axis in which the cells are fetched. countnumber the size of the range for this axis in which the cells are fetched. callbacksObject the callbacks to be invoke when fetch cells operation is completed. The valid callback types are "success" and "error". Properties
Name Type Description successfunction(CellSet) the callback to invoke when fetch cells completed successfully. errorfunction({status: Object}) the callback to invoke when fetch cells failed. callbackObjectsObject <optional>
the object in which the callback function is invoked on. This is optional. You can specify the callback object for each callbacks using the "success" and "error" keys. - Source:
- ojdatagrid/PagingDataGridDataSource.js, line 194
-
fetchHeaders(headerRange, callbacks, callbackObjects)
-
Fetch a range of headers from the data source.
Parameters:
Name Type Argument Description headerRangeObject information about the header range, it must contain the following properties: axis, start, count. Properties
Name Type Description axisstring the axis of the header that are fetched. Valid values are "row" and "column". startnumber the start index of the range in which the header data are fetched. countnumber the size of the range in which the header data are fetched. callbacksObject the callbacks to be invoke when fetch headers operation is completed. The valid callback types are "success" and "error". Properties
Name Type Description successfunction(HeaderSet) the callback to invoke when fetch headers completed successfully. errorfunction({status: Object}) the callback to invoke when fetch cells failed. callbackObjectsObject <optional>
the object in which the callback function is invoked on. This is optional. You can specify the callback object for each callbacks using the "success" and "error" keys. - Source:
- ojdatagrid/PagingDataGridDataSource.js, line 173
-
getCapability(feature) → {string|null}
-
Determines whether this DataGridDataSource supports certain feature.
Parameters:
Name Type Description featurestring the feature in which its capabilities is inquired. Currently the only valid feature is "sort". - Source:
- ojdatagrid/PagingDataGridDataSource.js, line 256
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
-
getCount(axis) → {number}
-
Returns the total number of rows or columns. If the value return is not >= 0 then it is automatically assumed that the total count is unknown. In the case of paging returns the total number of rows/colums on the page.
Parameters:
Name Type Description axisstring the axis in which we inquire for the total count. Valid values are "row" and "column". - Source:
- ojdatagrid/PagingDataGridDataSource.js, line 140
Returns:
the total number of rows/columns.- Type
- number
-
getCountPrecision(axis) → {string}
-
Returns whether the total count returned in getCount function is an actual or an estimate.
Parameters:
Name Type Description axisstring the axis in which we inquire whether the total count is an estimate. Valid values are "row" and "column". - Source:
- ojdatagrid/PagingDataGridDataSource.js, line 153
Returns:
"actual" if the count returned in getCount function is the actual count, "estimate" if the count returned in getCount function is an estimate. The default value is "actual".- Type
- string
-
#hasMore() → {boolean}
-
- Inherited From:
- Source:
- ojpagingcontrol/PagingDataSource.js, line 53
Returns:
whether there is more data- Type
- boolean
-
indexes(keys) → {Object.<number, number>}
-
Returns the row and column index based on the keys.
Parameters:
Name Type Description keysObject the key for each axis Properties
Name Type Description rowObject the key for the row axis columnObject the key for the column axis - Source:
- ojdatagrid/PagingDataGridDataSource.js, line 220
Returns:
indexes an object containing the index for each axis- Type
- Object.<number, number>
-
Init()
-
Initializes the instance.
- Source:
-
keys(indexes) → {Object.<Object, Object>}
-
Returns the keys based on the indexes.
Parameters:
Name Type Description indexesObject the index for each axis Properties
Name Type Description rowObject the index for the row axis columnObject the index for the column axis - Source:
- ojdatagrid/PagingDataGridDataSource.js, line 207
Returns:
an object containing the keys for each axis- Type
- Object.<Object, Object>
-
#next()
-
Calls fetch for the next page of data. No-op if no more data.
- Inherited From:
- Source:
- ojpagingcontrol/PagingDataSource.js, line 67
Throws:
- Type
- Error
-
off(eventType, eventHandler)
-
Detach an event handler from the datasource
Parameters:
Name Type Description eventTypestring eventType supported by the datasource eventHandlerfunction(Object) event handler function - Source:
- ojdatagrid/PagingDataGridDataSource.js, line 243
-
on(eventType, eventHandler)
-
Attach an event handler to the datasource
Parameters:
Name Type Description eventTypestring eventType supported by the datasource eventHandlerfunction(Object) event handler function - Source:
- ojdatagrid/PagingDataGridDataSource.js, line 231
-
#previous()
-
Calls fetch for the previous page of data. No-op if at the beginning.
- Inherited From:
- Source:
- ojpagingcontrol/PagingDataSource.js, line 80
Throws:
- Type
- Error
-
setPageSize(n)
-
Set or change the number of models in a page
Parameters:
Name Type Description nnumber page size - Source:
- ojdatagrid/PagingDataGridDataSource.js, line 112
-
#size() → {number}
-
- Source:
- ojdatagrid/PagingDataGridDataSource.js, line 274
Returns:
size of data- Type
- number
-
sort(criteria, callbacks, callbackObjects)
-
Performs a sort on the data source.
Parameters:
Name Type Argument Description criteriaObject the sort criteria. Properties
Name Type Description axisstring The axis in which the sort is performed, valid values are "row", "column" keyObject The key that identifies which header to sort directionstring the sort direction, valid values are "ascending", "descending", "none" (default) callbacksObject the callbacks to be invoke upon completion of the sort operation. The callback properties are "success" and "error". Properties
Name Type Description successfunction() the callback to invoke when the sort completed successfully. errorfunction({status: Object}) the callback to invoke when sort failed. callbackObjectsObject <optional>
the object in which the callback function is invoked on. This is optional. You can specify the callback object for each callbacks using the "success" and "error" properties. - Source:
- ojdatagrid/PagingDataGridDataSource.js, line 293
-
#startIndex() → {number}
-
- Inherited From:
- Source:
- ojpagingcontrol/PagingDataSource.js, line 103
Returns:
start index- Type
- number
-
#totalSize() → {number}
-
- Source:
- ojdatagrid/PagingDataGridDataSource.js, line 306
Returns:
total size of data- Type
- number