Class Paging
- All Implemented Interfaces:
Serializable,Cloneable,Component,Disable,Scope,ComponentCtrl,Pageable,Paginal
- Direct Known Subclasses:
MeshElement.InternalPaging
Default getZclass(): z-paging. (since 3.5.0)
- Author:
- tomyeh
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
HtmlBasedComponent.ExtraCtrlNested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
AbstractComponent.Children, AbstractComponent.ForwardInfo, AbstractComponent.TargetInfo -
Field Summary
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclassFields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPEFields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_CLONED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the active page (starting from 0).intReturns the number of pages.intReturns the number of page anchors shall appear at the client.intReturns the number of items per page.intReturns the total number of items.Returns the ZK Cascading Style class for this component.booleanReturns whether to automatically hide this component if there is only one page available.protected booleanReturns whether this component can have a child.booleanReturns whether to show the detailed info, such asPaginal.getTotalSize().booleanReturns whether it is disabled.booleanReturns whether this component is visible.protected voidrenderProperties(ContentRenderer renderer) Renders the content of this component, excluding the enclosing tags and children.voidProcesses 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 itemsMethods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributesMethods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, evalCSSFlex, focus, getAction, getClientAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, 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, setSkeleton, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyMethods 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, getStubonlyDescendants, 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, setStubonlyDescendants, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerializeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.zkoss.zul.ext.Paginal
addEventListener, removeEventListener
-
Constructor Details
-
Paging
public Paging() -
Paging
public Paging(int totalsz, int pagesz) Constructor.- Parameters:
totalsz- the total # of itemspagesz- the # of items per page
-
-
Method Details
-
getPageSize
public int getPageSize()Description copied from interface:PageableReturns the number of items per page.Default: 20.
- Specified by:
getPageSizein interfacePageable
-
setPageSize
Sets the items to show in each page- Specified by:
setPageSizein interfacePageable- Throws:
WrongValueException
-
getTotalSize
public int getTotalSize()Description copied from interface:PaginalReturns the total number of items.- Specified by:
getTotalSizein interfacePaginal
-
setTotalSize
Sets total size of items- Specified by:
setTotalSizein interfacePaginal- Throws:
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
Set the active pageNote: In server side, active page starts from 0. But in browser UI, it starts from 1
- Specified by:
setActivePagein interfacePageable- Throws:
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
Sets the number of page list icon when mold is "os"- Specified by:
setPageIncrementin interfacePaginal- Throws:
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
Description copied from class:HtmlBasedComponentRenders the content of this component, excluding the enclosing tags and children.- Overrides:
renderPropertiesin classXulElement- Throws:
IOException
-
getZclass
Description copied from class:HtmlBasedComponentReturns the ZK Cascading Style class for this component. It usually depends on the implementation of the mold (AbstractComponent.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 ofHtmlBasedComponent.getZclass(). Once it is changed, the default style won't be applied at all. If you want to perform small adjustments, useHtmlBasedComponent.setSclass(java.lang.String)instead.- Overrides:
getZclassin classHtmlBasedComponent- See Also:
-
isVisible
public boolean isVisible()Description copied from interface:ComponentReturns whether this component is visible.- Specified by:
isVisiblein interfaceComponent- Overrides:
isVisiblein classAbstractComponent- See Also:
-
isChildable
protected boolean isChildable()Description copied from class:AbstractComponentReturns whether this component can have a child.Default: return true (means it can have children).
- Overrides:
isChildablein classAbstractComponent
-
service
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 interfaceComponentCtrl- Overrides:
servicein classHtmlBasedComponenteverError- whether any error ever occurred before processing this request.- Since:
- 5.0.0
- See Also:
-
isDisabled
public boolean isDisabled()Returns whether it is disabled.Default: false.
- Specified by:
isDisabledin interfaceDisable- Since:
- 8.0.3
-
setDisabled
public void setDisabled(boolean disabled) Sets whether it is disabled.- Specified by:
setDisabledin interfaceDisable- Since:
- 8.0.3
-