public class Paging extends XulElement implements Paginal
Default getZclass(): z-paging. (since 3.5.0)
HtmlBasedComponent.ExtraCtrlAbstractComponent.Children_zclassAPPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPECE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE| Constructor and Description |
|---|
Paging() |
Paging(int totalsz,
int pagesz)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getActivePage()
Returns the active page (starting from 0).
|
int |
getPageCount()
Returns the number of pages.
|
int |
getPageIncrement()
Returns the number of page anchors shall appear at the client.
|
int |
getPageSize()
Returns the number of items per page.
|
int |
getTotalSize()
Returns the total number of items.
|
java.lang.String |
getZclass()
Returns the ZK Cascading Style class(es) for this component.
|
boolean |
isAutohide()
Returns whether to automatically hide this component if
there is only one page available.
|
protected boolean |
isChildable()
Returns whether this component can have a child.
|
boolean |
isDetailed()
Returns whether to show the detailed info, such as
Paginal.getTotalSize(). |
boolean |
isVisible()
Returns whether this component is visible.
|
protected void |
renderProperties(ContentRenderer renderer)
Renders the content of this component, excluding the enclosing
tags and children.
|
void |
service(AuRequest request,
boolean everError)
Processes an AU request.
|
void |
setActivePage(int pg)
Set the active page
Note: In server side, active page starts from 0.
|
void |
setAutohide(boolean autohide)
Sets whether to automatically hide this component if
there is only one page available.
|
void |
setDetailed(boolean detailed)
Sets whether to show total size and index of items in current page
|
void |
setPageIncrement(int pginc)
Sets the number of page list icon when mold is "os"
|
void |
setPageSize(int size)
Sets the items to show in each page
|
void |
setTotalSize(int size)
Sets total size of items
|
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltipfocus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeightDirectly, setHflex, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTooltiptext, setTop, setTopDirectly, setVflex, setWidth, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyaddAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowRoots, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, isInvalidated, isListenerAvailable, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerializefinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddEventListener, removeEventListenerpublic Paging()
public Paging(int totalsz,
int pagesz)
totalsz - the total # of itemspagesz - the # of items per pagepublic int getPageSize()
PageableDefault: 20.
getPageSize in interface Pageablepublic void setPageSize(int size)
throws WrongValueException
setPageSize in interface PageableWrongValueExceptionpublic int getTotalSize()
PaginalgetTotalSize in interface Paginalpublic void setTotalSize(int size)
throws WrongValueException
setTotalSize in interface PaginalWrongValueExceptionpublic int getPageCount()
PageablegetPageCount in interface Pageablepublic int getActivePage()
PageablegetActivePage in interface Pageablepublic void setActivePage(int pg)
throws WrongValueException
Note: In server side, active page starts from 0. But in browser UI, it starts from 1
setActivePage in interface PageableWrongValueExceptionpublic int getPageIncrement()
PaginalDefault: 10.
getPageIncrement in interface Paginalpublic void setPageIncrement(int pginc)
throws WrongValueException
setPageIncrement in interface PaginalWrongValueExceptionpublic boolean isDetailed()
PaginalPaginal.getTotalSize().isDetailed in interface Paginalpublic void setDetailed(boolean detailed)
setDetailed in interface Paginalpublic boolean isAutohide()
Default: false.
isAutohide in interface Paginalpublic void setAutohide(boolean autohide)
setAutohide in interface Paginalprotected void renderProperties(ContentRenderer renderer) throws java.io.IOException
HtmlBasedComponentrenderProperties in class XulElementjava.io.IOExceptionpublic java.lang.String getZclass()
HtmlBasedComponentAbstractComponent.getMold()).
Default: null (the default value depends on element).
HtmlBasedComponent.setZclass(java.lang.String)) will completely replace the default style
of a component. In other words, the default style of a component
is associated with the default value of HtmlBasedComponent.getZclass().
Once it is changed, the default style won't be applied at all.
If you want to perform small adjustments, use HtmlBasedComponent.setSclass(java.lang.String)
instead.
getZclass in class HtmlBasedComponentHtmlBasedComponent.getSclass()public boolean isVisible()
ComponentisVisible in interface ComponentisVisible in class AbstractComponentComponents.isRealVisible(org.zkoss.zk.ui.Component)protected boolean isChildable()
AbstractComponentDefault: return true (means it can have children).
isChildable in class AbstractComponentpublic void service(AuRequest request, boolean everError)
Default: in addition to what are handled by HtmlBasedComponent.service(org.zkoss.zk.au.AuRequest, boolean),
it also handles onSelect.
service in interface ComponentCtrlservice in class HtmlBasedComponenteverError - whether any error ever occurred before
processing this request.AbstractComponent.setAuService(org.zkoss.zk.au.AuService)Copyright © 2005-2011 Potix Corporation. All Rights Reserved.