new DataPager()
Methods
-
getPageCount() → {Int}
-
Returns total page count.
Returns:
- Type
- Int
-
switchToPage(pageIndex, timeout)
-
Request data on page index. When data is retrieved, event pageSwitched will be invoked. When error or timeout, event pageSwitchError will be invoked.
Parameters:
Name Type Description pageIndex
Int timeout
Int
Events
-
dataError
-
Invoked when retrieving data error. event param of it has field: {err}
-
dataFetched
-
Invoked when page index is changed and data are successfully retrieved. event param of it has field: {pageIndex, data}
-
pageCountChange
-
Invoked when page count is changed event param of it has field: {pageCount}
-
pageRetrieve
-
Invoked when data of new page is starting to retrieve. event param of it has field: {pageIndex}