Package org.zkoss.zul.event
Class PagingEvent
java.lang.Object
org.zkoss.zk.ui.event.Event
org.zkoss.zul.event.PagingEvent
- All Implemented Interfaces:
Serializable
public class PagingEvent
extends org.zkoss.zk.ui.event.Event
Used to notify that a new page is selected by the user, or by
Paginal (such as Paging).
It is used for paging long content.- Author:
- tomyeh
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPagingEvent(String name, org.zkoss.zk.ui.Component target, int actpg) Construct a paging event.PagingEvent(String name, org.zkoss.zk.ui.Component target, Pageable pageable, int actpg) Construct a paging event that the target is different from the page controller. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the active page (starting from 0).Returns the pageable controller.static final PagingEventgetPagingEvent(org.zkoss.zk.au.AuRequest request) Converts an AU request to a render event.Methods inherited from class org.zkoss.zk.ui.event.Event
getData, getEvent, getName, getPage, getTarget, isPropagatable, stopPropagation, toString
-
Constructor Details
-
PagingEvent
Construct a paging event.- Parameters:
target- the target must be a paginal component, i.e., implementsPageable.actpg- the active page
-
PagingEvent
Construct a paging event that the target is different from the page controller.- Parameters:
target- the event targetpageable- the paging controller. In other words, it is usuallyPaginal.
-
-
Method Details
-
getPagingEvent
Converts an AU request to a render event.- Since:
- 5.0.0
-
getPageable
Returns the pageable controller.- Since:
- 2.4.1
-
getActivePage
public int getActivePage()Returns the active page (starting from 0).It is the same as
getPageable()'sPageable.getActivePage().To get the index of the first visible item, use
.getActivePage()*Pageable.getPageSize()
-