Package org.zkoss.zul
Class Paging
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.impl.XulElement
-
- org.zkoss.zul.Paging
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,org.zkoss.zk.ui.Component,org.zkoss.zk.ui.ext.Disable,org.zkoss.zk.ui.ext.Scope,org.zkoss.zk.ui.sys.ComponentCtrl,Pageable,Paginal
- Direct Known Subclasses:
MeshElement.InternalPaging
public class Paging extends XulElement implements Paginal
Paging of long content.Default
getZclass(): z-paging. (since 3.5.0)- Author:
- tomyeh
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetActivePage()Returns the active page (starting from 0).intgetPageCount()Returns the number of pages.intgetPageIncrement()Returns the number of page anchors shall appear at the client.intgetPageSize()Returns the number of items per page.intgetTotalSize()Returns the total number of items.java.lang.StringgetZclass()booleanisAutohide()Returns whether to automatically hide this component if there is only one page available.protected booleanisChildable()booleanisDetailed()Returns whether to show the detailed info, such asPaginal.getTotalSize().booleanisDisabled()Returns whether it is disabled.booleanisVisible()protected voidrenderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)voidservice(org.zkoss.zk.au.AuRequest request, boolean everError)Processes an AU request.voidsetActivePage(int pg)Set the active pagevoidsetAutohide(boolean autohide)Sets whether to automatically hide this component if there is only one page available.voidsetDetailed(boolean detailed)Sets whether to show total size and index of items in current pagevoidsetDisabled(boolean disabled)Sets whether it is disabled.voidsetPageIncrement(int pginc)Sets the number of page list icon when mold is "os"voidsetPageSize(int size)Sets the items to show in each pagevoidsetTotalSize(int size)Sets total size of items-
Methods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
-
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, evalCSSFlex, focus, getAction, getClientAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setClientAction, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, 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, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.zkoss.zul.ext.Paginal
addEventListener, removeEventListener
-
-
-
-
Method Detail
-
getPageSize
public int getPageSize()
Description copied from interface:PageableReturns the number of items per page.Default: 20.
- Specified by:
getPageSizein interfacePageable
-
setPageSize
public void setPageSize(int size) throws org.zkoss.zk.ui.WrongValueExceptionSets the items to show in each page- Specified by:
setPageSizein interfacePageable- Throws:
org.zkoss.zk.ui.WrongValueException
-
getTotalSize
public int getTotalSize()
Description copied from interface:PaginalReturns the total number of items.- Specified by:
getTotalSizein interfacePaginal
-
setTotalSize
public void setTotalSize(int size) throws org.zkoss.zk.ui.WrongValueExceptionSets total size of items- Specified by:
setTotalSizein interfacePaginal- Throws:
org.zkoss.zk.ui.WrongValueException
-
getPageCount
public int getPageCount()
Description copied from interface:PageableReturns the number of pages. Note: there is at least one page even no item at all.- Specified by:
getPageCountin interfacePageable
-
getActivePage
public int getActivePage()
Description copied from interface:PageableReturns the active page (starting from 0).- Specified by:
getActivePagein interfacePageable
-
setActivePage
public void setActivePage(int pg) throws org.zkoss.zk.ui.WrongValueExceptionSet the active pageNote: In server side, active page starts from 0. But in browser UI, it starts from 1
- Specified by:
setActivePagein interfacePageable- Throws:
org.zkoss.zk.ui.WrongValueException
-
getPageIncrement
public int getPageIncrement()
Description copied from interface:PaginalReturns the number of page anchors shall appear at the client.Default: 10.
- Specified by:
getPageIncrementin interfacePaginal
-
setPageIncrement
public void setPageIncrement(int pginc) throws org.zkoss.zk.ui.WrongValueExceptionSets the number of page list icon when mold is "os"- Specified by:
setPageIncrementin interfacePaginal- Throws:
org.zkoss.zk.ui.WrongValueException
-
isDetailed
public boolean isDetailed()
Description copied from interface:PaginalReturns whether to show the detailed info, such asPaginal.getTotalSize().- Specified by:
isDetailedin interfacePaginal
-
setDetailed
public void setDetailed(boolean detailed)
Sets whether to show total size and index of items in current page- Specified by:
setDetailedin interfacePaginal
-
isAutohide
public boolean isAutohide()
Returns whether to automatically hide this component if there is only one page available.Default: false.
- Specified by:
isAutohidein interfacePaginal
-
setAutohide
public void setAutohide(boolean autohide)
Sets whether to automatically hide this component if there is only one page available.- Specified by:
setAutohidein interfacePaginal
-
renderProperties
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException- Overrides:
renderPropertiesin classXulElement- Throws:
java.io.IOException
-
getZclass
public java.lang.String getZclass()
- Overrides:
getZclassin classorg.zkoss.zk.ui.HtmlBasedComponent
-
isVisible
public boolean isVisible()
- Specified by:
isVisiblein interfaceorg.zkoss.zk.ui.Component- Overrides:
isVisiblein classorg.zkoss.zk.ui.AbstractComponent
-
isChildable
protected boolean isChildable()
- Overrides:
isChildablein classorg.zkoss.zk.ui.AbstractComponent
-
service
public void service(org.zkoss.zk.au.AuRequest request, boolean everError)Processes an AU request.Default: in addition to what are handled by
HtmlBasedComponent.service(org.zkoss.zk.au.AuRequest, boolean), it also handles onSelect.- Specified by:
servicein interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
servicein classorg.zkoss.zk.ui.HtmlBasedComponent- Since:
- 5.0.0
-
isDisabled
public boolean isDisabled()
Returns whether it is disabled.Default: false.
- Specified by:
isDisabledin interfaceorg.zkoss.zk.ui.ext.Disable- Since:
- 8.0.3
-
setDisabled
public void setDisabled(boolean disabled)
Sets whether it is disabled.- Specified by:
setDisabledin interfaceorg.zkoss.zk.ui.ext.Disable- Since:
- 8.0.3
-
-