org.zkoss.zul.event
Class PagingEvent

java.lang.Object
  extended by org.zkoss.zk.ui.event.Event
      extended by org.zkoss.zul.event.PagingEvent

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

Constructor Summary
PagingEvent(java.lang.String name, org.zkoss.zk.ui.Component target, int actpg)
          Construct a paging event.
PagingEvent(java.lang.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.
PagingEvent(java.lang.String name, org.zkoss.zk.ui.Component target, Paginal paginal, int actpg)
          Deprecated.  
 
Method Summary
 int getActivePage()
          Returns the active page (starting from 0).
 Pageable getPageable()
          Returns the pageable controller.
 Paginal getPaginal()
          Deprecated.  
 
Methods inherited from class org.zkoss.zk.ui.event.Event
getData, getName, getPage, getTarget, isPropagatable, stopPropagation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PagingEvent

public PagingEvent(java.lang.String name,
                   org.zkoss.zk.ui.Component target,
                   int actpg)
Construct a paging event.

Parameters:
target - the target must be a paginal component, i.e., implements Pageable.
actpg - the active page

PagingEvent

public PagingEvent(java.lang.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.

Parameters:
target - the event target
pageable - the paging controller. In other words, it is usually Paginal.

PagingEvent

public PagingEvent(java.lang.String name,
                   org.zkoss.zk.ui.Component target,
                   Paginal paginal,
                   int actpg)
Deprecated. 

Construct a paging event that the target is different from the page controller.

Deprecated since 2.4.1. Use PagingEvent(String,Component,Paginal,int) instead.

Parameters:
target - the event target
paginal - the paging controller.
Method Detail

getPageable

public Pageable getPageable()
Returns the pageable controller.

Since:
2.4.1

getPaginal

public Paginal getPaginal()
Deprecated. 

Returns the paginal controller.

Deprecated since 2.4.1. Use getPageable() instead.


getActivePage

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

It is the same as getPageable()'s Pageable.getActivePage().

To get the index of the first visible item, use
getActivePage() * Pageable.getPageSize().



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