Interface: PagingModel

Oracle® JavaScript Extension Toolkit (JET)
17.1.0

G12196-01

Since:
  • 1.1
Module:
  • ojpagingmodel

QuickNav

Fields

Description

The interface for PagingModel which should be implemented by all object instances bound to the data parameter for oj.PagingControl. PagingModel implementations should also support event subscription by extending EventSource or DataSource.


Usage

Typescript Import Format
//To use this interface, import as below.
import {PagingModel} from "ojs/ojpagingmodel";

For additional information visit:


The interface for PagingModel which should be implemented by all object instances bound to the data parameter for oj.PagingControl. PagingModel implementations should also support event subscription by extending EventSource or DataSource.

Fields

(static) EventType :string

Properties:
Name Type Default Description
BEFOREPAGE string beforePage Triggered before the current page has changed.

This event is vetoable.

The event payload contains:

page The new current page
previousPage The old current page

PAGE string page Triggered when the current page has changed

The event payload contains:

page The new current page
previousPage The old current page

PAGECOUNT string pageCount Triggered when the page count has changed

The event payload contains:

pageCount The new page count
previousPageCount The old page count

Methods

getEndItemIndex : {number}

Get the current page end index
Returns:

The current page end index

Type
number

getPage : {number}

Get the current page
Returns:

The current page

Type
number

getPageCount : {number}

Get the page count
Returns:

The total number of pages

Type
number

getStartItemIndex : {number}

Get the current page start index
Returns:

The current page start index

Type
number

setPage(value, options) : {Promise}

Set the current page
Parameters:
Name Type Argument Description
value number The current page
options Object <optional>
Options

pageSize: The page size.

Returns:

promise object triggering done when complete..

Type
Promise

totalSize : {number}

Returns:

total number of items

Type
number

totalSizeConfidence : {string}

Returns the confidence for the totalSize value.
Returns:

"actual" if the totalSize is the time of the fetch is an exact number "estimate" if the totalSize is an estimate "atLeast" if the totalSize is at least a certain number "unknown" if the totalSize is unknown

Type
string