public interface Paginal extends Pageable
It is used to provide an abstract contract between controller and controllee.
For example, Paging is a paging controller
while Grid is a paging controllee.
In other words, Grid (contains long content)
can be controlled by Paging.
The paging controller must implement this interface, while
the paging controllee shall access only this interface (rather than
Paging or so).
Note: If a component supports multiple pages but it cannot
be controlled by a paging controller, it shall implement
Pageable instead.
Example, Treechildren
is Pageable but not controllable by Paginal.
Paginated| Modifier and Type | Method and Description |
|---|---|
boolean |
addEventListener(String evtnm,
org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener)
Adds an event listener to specified event for this component.
|
int |
getPageIncrement()
Returns the number of page anchors shall appear at the client.
|
int |
getTotalSize()
Returns the total number of items.
|
boolean |
isAutohide()
Returns whether to automatically hide the paging if
there is only one page available.
|
boolean |
isDetailed()
Returns whether to show the detailed info, such as
getTotalSize(). |
boolean |
removeEventListener(String evtnm,
org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener)
Removes an event listener.
|
void |
setAutohide(boolean autohide)
Sets whether to automatically hide the paging if
there is only one page available.
|
void |
setDetailed(boolean detailed)
Sets whether to show the detailed info, such as
getTotalSize(). |
void |
setPageIncrement(int pginc)
Sets the number of page anchors shall appear at the client.
|
void |
setTotalSize(int size)
Sets the total number of items.
|
getActivePage, getPageCount, getPageSize, setActivePage, setPageSizeboolean isAutohide()
void setAutohide(boolean autohide)
int getTotalSize()
void setTotalSize(int size)
throws org.zkoss.zk.ui.WrongValueException
org.zkoss.zk.ui.WrongValueExceptionint getPageIncrement()
Default: 10.
void setPageIncrement(int pginc)
throws org.zkoss.zk.ui.WrongValueException
org.zkoss.zk.ui.WrongValueExceptionboolean isDetailed()
getTotalSize().void setDetailed(boolean detailed)
getTotalSize().boolean addEventListener(String evtnm, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener)
The onPaging event is sent with an instance of
PagingEvent to notify which page
is selected.
evtnm - what event to listen (never null)PagingEventboolean removeEventListener(String evtnm, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener)
Copyright © 2015. All rights reserved.