Class: PagingDataSource

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

E54107-01

QuickNav

oj. PagingDataSource

Decorator for DataSource to enable paging functionality to be used by the paging control.

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:

Fields

<static> EventType :string

Properties:
Name Type Default Description
SYNC string sync Triggered when a model or collection has been updated from the data service
Source:

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:
Throws:
Type
Error

#hasMore() → {boolean}

Source:
Returns:
whether there is more data
Type
boolean

Init()

Initializes the instance.
Source:

#next()

Calls fetch for the next page of data. No-op if no more data.
Source:
Throws:
Type
Error

#previous()

Calls fetch for the previous page of data. No-op if at the beginning.
Source:
Throws:
Type
Error

setPageSize(n)

Set or change the number of models in a page
Parameters:
Name Type Description
n number page size
Source:

#size() → {number}

Source:
Returns:
size of data
Type
number

#startIndex() → {number}

Source:
Returns:
start index
Type
number

#totalSize() → {number}

Source:
Returns:
total size of data
Type
number