org.zkoss.zul.ext
Interface Pageable

All Known Subinterfaces:
Paginal
All Known Implementing Classes:
Paging, Treechildren

public interface Pageable

Denotes a component that can be displayed in multiple pages.

Note: a component that can be displayed in multiple pages can be implemented in two ways.

1) If it can be controlled by a paging controller (i.e., Paginal), it shall hold an reference to one of the paging controllers.

2) If it cannot be controlled, it shall implement the Pageable interface.

Since:
2.4.1
Author:
tomyeh
See Also:
Paginal

Method Summary
 int getActivePage()
          Returns the active page (starting from 0).
 int getPageCount()
          Returns the number of pages.
 int getPageSize()
          Returns the number of items per page.
 void setActivePage(int pg)
          Sets the active page (starting from 0).
 void setPageSize(int size)
          Sets the number of items per page.
 

Method Detail

getPageSize

int getPageSize()
Returns the number of items per page.

Default: 20.


setPageSize

void setPageSize(int size)
                 throws org.zkoss.zk.ui.WrongValueException
Sets the number of items per page.

Throws:
org.zkoss.zk.ui.WrongValueException

getPageCount

int getPageCount()
Returns the number of pages. Note: there is at least one page even no item at all.


getActivePage

int getActivePage()
Returns the active page (starting from 0).


setActivePage

void setActivePage(int pg)
                   throws org.zkoss.zk.ui.WrongValueException
Sets the active page (starting from 0).

Throws:
org.zkoss.zk.ui.WrongValueException


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.