Class sap.ui.commons.PaginatorModule: sap/ui/commons/Paginator

extends Control

Provides navigation between pages within a list of numbered pages.
Deprecated API:
Since version 1.38.
Constructor Summary
new sap.ui.commons.Paginator(sId?, mSettings?)Constructor for a new Paginator.
Event Summary
page(oControlEvent)Event is fired when the user navigates to another page by selecting it directly, or by jumping forward/backward.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.commons.Paginator.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.commons.Paginator with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.commons.Paginator.getMetadata()Returns a metadata object for class sap.ui.commons.Paginator.
attachPage(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the page event of this sap.ui.commons.Paginator.
detachPage(fnFunction, oListener)Detaches event handler fnFunction from the page event of this sap.ui.commons.Paginator.
firePage(mParameters?)Fires event page to attached listeners.
getCurrentPage()Gets current value of property currentPage.
getNumberOfPages()Gets current value of property numberOfPages.
setCurrentPage(iCurrentPage)Sets a new value for property currentPage.
setNumberOfPages(iNumberOfPages)Sets a new value for property numberOfPages.
Constructor Detail
new sap.ui.commons.Paginator(sId?, mSettings?)

Constructor for a new Paginator.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

  • Properties

  • Events

    • page : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
stringsId?ID for the new control, generated automatically if no ID is given
objectmSettings?Initial settings for the new control
Event Detail
page(oControlEvent)
Event is fired when the user navigates to another page by selecting it directly, or by jumping forward/backward.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
intoControlEvent.getParameters.srcPageThe page which is the current one before the page event is fired (and another page is displayed)
intoControlEvent.getParameters.targetPage

The page that shall be displayed next after the page event is fired.

The page number is 1-based: the first page has index 1, not 0, to match the number visible in the UI.

sap.ui.commons.PaginatorEventoControlEvent.getParameters.typeProvides the values 'First', 'Last', 'Next', 'Previous', 'Goto'. The event parameter informs the application how the user navigated to the new page: Whether the 'Next' button was used, or another button, or whether the page was directly selected
Method Detail
sap.ui.commons.Paginator.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.ui.commons.Paginator with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.

Parameters:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.ui.commons.Paginator.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.commons.Paginator.
Returns:
sap.ui.base.MetadataMetadata object describing this class
attachPage(oData?, fnFunction, oListener?): sap.ui.commons.Paginator

Attaches event handler fnFunction to the page event of this sap.ui.commons.Paginator.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.commons.Paginator itself.

Event is fired when the user navigates to another page by selecting it directly, or by jumping forward/backward.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.commons.Paginator itself
Returns:
sap.ui.commons.PaginatorReference to this in order to allow method chaining
detachPage(fnFunction, oListener): sap.ui.commons.Paginator

Detaches event handler fnFunction from the page event of this sap.ui.commons.Paginator.

The passed function and listener object must match the ones used for event registration.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.commons.PaginatorReference to this in order to allow method chaining
firePage(mParameters?): sap.ui.commons.Paginator
Fires event page to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
intmParameters.srcPage?The page which is the current one before the page event is fired (and another page is displayed)
intmParameters.targetPage?

The page that shall be displayed next after the page event is fired.

The page number is 1-based: the first page has index 1, not 0, to match the number visible in the UI.

sap.ui.commons.PaginatorEventmParameters.type?Provides the values 'First', 'Last', 'Next', 'Previous', 'Goto'. The event parameter informs the application how the user navigated to the new page: Whether the 'Next' button was used, or another button, or whether the page was directly selected
Returns:
sap.ui.commons.PaginatorReference to this in order to allow method chaining
getCurrentPage(): int

Gets current value of property currentPage.

Represents the current page (first page has index 1, not 0, to match the visual number)

Default value is 1.

Returns:
intValue of property currentPage
getNumberOfPages(): int

Gets current value of property numberOfPages.

Represents the overall number of pages that are embedded into the parent control

Returns:
intValue of property numberOfPages
setCurrentPage(iCurrentPage): sap.ui.commons.Paginator

Sets a new value for property currentPage.

Represents the current page (first page has index 1, not 0, to match the visual number)

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 1.

Parameters:
intiCurrentPageNew value for property currentPage
Returns:
sap.ui.commons.PaginatorReference to this in order to allow method chaining
setNumberOfPages(iNumberOfPages): sap.ui.commons.Paginator

Sets a new value for property numberOfPages.

Represents the overall number of pages that are embedded into the parent control

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
intiNumberOfPagesNew value for property numberOfPages
Returns:
sap.ui.commons.PaginatorReference to this in order to allow method chaining