public class Paging extends XulElement implements Paginal
Default getZclass()
: z-paging. (since 3.5.0)
HtmlBasedComponent.ExtraCtrl
AbstractComponent.Children
_zclass
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_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 |
isDisabled()
Returns whether it is disabled.
|
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 |
setDisabled(boolean disabled)
Sets whether it is disabled.
|
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, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
addSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, 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
addAnnotation, addAnnotation, addCallback, 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, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, 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, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, 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, invalidatePartial, isInitialized, isInvalidated, isListenerAvailable, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, 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, willSerialize
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEventListener, removeEventListener
invalidatePartial
public Paging()
public Paging(int totalsz, int pagesz)
totalsz
- the total # of itemspagesz
- the # of items per pagepublic int getPageSize()
Pageable
Default: 20.
getPageSize
in interface Pageable
public void setPageSize(int size) throws WrongValueException
setPageSize
in interface Pageable
WrongValueException
public int getTotalSize()
Paginal
getTotalSize
in interface Paginal
public void setTotalSize(int size) throws WrongValueException
setTotalSize
in interface Paginal
WrongValueException
public int getPageCount()
Pageable
getPageCount
in interface Pageable
public int getActivePage()
Pageable
getActivePage
in interface Pageable
public 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 Pageable
WrongValueException
public int getPageIncrement()
Paginal
Default: 10.
getPageIncrement
in interface Paginal
public void setPageIncrement(int pginc) throws WrongValueException
setPageIncrement
in interface Paginal
WrongValueException
public boolean isDetailed()
Paginal
Paginal.getTotalSize()
.isDetailed
in interface Paginal
public void setDetailed(boolean detailed)
setDetailed
in interface Paginal
public boolean isAutohide()
Default: false.
isAutohide
in interface Paginal
public void setAutohide(boolean autohide)
setAutohide
in interface Paginal
protected void renderProperties(ContentRenderer renderer) throws java.io.IOException
HtmlBasedComponent
renderProperties
in class XulElement
java.io.IOException
public java.lang.String getZclass()
HtmlBasedComponent
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 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 HtmlBasedComponent
HtmlBasedComponent.getSclass()
public boolean isVisible()
Component
isVisible
in interface Component
isVisible
in class AbstractComponent
Components.isRealVisible(org.zkoss.zk.ui.Component)
protected boolean isChildable()
AbstractComponent
Default: return true (means it can have children).
isChildable
in class AbstractComponent
public 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 ComponentCtrl
service
in class HtmlBasedComponent
everError
- whether any error ever occurred before
processing this request.AbstractComponent.setAuService(org.zkoss.zk.au.AuService)
public boolean isDisabled()
Default: false.
isDisabled
in interface Disable
public void setDisabled(boolean disabled)
setDisabled
in interface Disable
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.