Constructor
new PagingDataSource(dataSource, options)
The base class for PagingDataSource.
Parameters:
Name | Type | Description |
---|---|---|
dataSource |
Object | |
options |
Object | null | Array of options for the PagingControlDataSource |
- Source:
- ojpagingcontrol/PagingDataSource.js, line 11
Fields
-
<static> EventType :string
-
- Source:
- ojpagingcontrol/PagingDataSource.js, line 143
Properties:
Name Type Default Description SYNC
string sync Triggered when a model or collection has been updated from the data service
Methods
-
#fetch(options)
-
Calls fetch on the datasource with paging options.
Parameters:
Name Type Argument Description options
Object <optional>
Options to control fetch startIndex: The index at which to start fetching records.
pageSize: The number of records to be fetched.
- Source:
- ojpagingcontrol/PagingDataSource.js, line 40
Throws:
- Type
- Error
-
#hasMore() → {boolean}
-
- Source:
- ojpagingcontrol/PagingDataSource.js, line 53
Returns:
whether there is more data- Type
- boolean
-
Init()
-
Initializes the instance.
- Source:
- ojpagingcontrol/PagingDataSource.js, line 24
-
#next()
-
Calls fetch for the next page of data. No-op if no more data.
- Source:
- ojpagingcontrol/PagingDataSource.js, line 67
Throws:
- Type
- Error
-
#previous()
-
Calls fetch for the previous page of data. No-op if at the beginning.
- 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 n
number page size - Source:
- ojpagingcontrol/PagingDataSource.js, line 90
-
#size() → {number}
-
- Source:
- ojpagingcontrol/PagingDataSource.js, line 118
Returns:
size of data- Type
- number
-
#startIndex() → {number}
-
- Source:
- ojpagingcontrol/PagingDataSource.js, line 103
Returns:
start index- Type
- number
-
#totalSize() → {number}
-
- Source:
- ojpagingcontrol/PagingDataSource.js, line 132
Returns:
total size of data- Type
- number