Package org.zkoss.zuti.zul
Class ForEach
java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlShadowElement
org.zkoss.zuti.zul.TemplateBasedShadowElement
org.zkoss.zuti.zul.ForEach
- All Implemented Interfaces:
Serializable,Cloneable,Component,AfterCompose,Scope,ShadowElement,ShadowElementCtrl,ComponentCtrl
The basic iteration tag, accepting many different collection types and
supporting sub-setting and other functionality like JSTL's forEach
- Since:
- 8.0.0
- Author:
- jumperchen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlShadowElement
HtmlShadowElement.DirectionNested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
AbstractComponent.Children, AbstractComponent.ForwardInfo, AbstractComponent.TargetInfo -
Field Summary
FieldsFields inherited from class org.zkoss.zuti.zul.TemplateBasedShadowElement
_dirtyBinding, FOREACH_RENDERED_COMPONENTS, ON_BINDING_READY, SHADOW_VARIABLEFields inherited from class org.zkoss.zk.ui.HtmlShadowElement
_afterComposed, _dynamicValue, BIND_ANNO, BINDER, FOREACH_IN_RENDER, INIT_ANNO, LOAD_ANNO, ON_REBUILD_SHADOW_TREE_LATER, REFERENCE_ANNO, SAVE_ANNO, SKIP_DISTRIBUTED_CHILDREN_PROPERTY_CHANGEFields 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 TypeMethodDescriptionprotected voidComposes the shadow element.intgetBegin()intgetEnd()getItems()getPropertyAccess(String prop) Returns the corresponding property access object from the given property name, if any.intgetStep()getVar()booleanReturns whether the shadow element contains a dynamic value, it means the shadow element cannot be destroyed after evaluated.protected booleanReturns whether the shadow element is effectivevoidonParentChanged(Component parent) Called after the parent changed.voidvoidsetBegin(int begin) voidsetEnd(int end) voidvoidsetStep(int step) voidvoidsetVarStatus(String varStatus) Methods inherited from class org.zkoss.zuti.zul.TemplateBasedShadowElement
addBindingListener, afterCompose, clone, detach, docheck0, isBindingReady, isDirtyBinding, onChildAdded, onChildRemoved, rebuildSubShadowTree, removeBindingListenerMethods inherited from class org.zkoss.zk.ui.HtmlShadowElement
afterHostChildAdded, afterHostChildRemoved, asShadow, beforeChildAdded, beforeHostChildAdded, beforeHostChildRemoved, beforeHostParentChanged, beforeParentChanged, clearChildren, destroyIndexCacheMap, getDistributedChildren, getFirstInsertion, getIndex, getIndexCacheMap, getLastInsertion, getNextInsertion, getNextInsertionComponentIfAny, getPreviousInsertion, getPreviousInsertionComponentIfAny, getShadowHost, getShadowHostIfAny, initClone, initIndexCacheMap, inRange, invalidate, isDynamicValue, mergeSubTree, mergeToHost, onHostAttached, onHostChildAdded, onHostChildRemoved, onHostDetached, recreate, resolveVariable, setDynamicValue, setParent, setPrevInsertion, setShadowHost, shrinkRange, stretchRange, toString, updateFirstInsertion, updateLastInsertion, updateNextInsertion, updatePreviousInsertion, updateSubBindingAnnotationCountMethods 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, beforeChildRemoved, 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, getExtraCtrl, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getForwards, getId, 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, insertBefore, isChildable, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderProperties, renderPropertiesOnly, replace, response, response, response, service, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setStubonly, setStubonly, setStubonlyDescendants, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, updateByClient, willPassivate, willPassivate, willSerialize, willSerialize
-
Field Details
-
_dataListener
-
-
Constructor Details
-
ForEach
public ForEach()
-
-
Method Details
-
setItems
-
getItems
-
setBegin
public void setBegin(int begin) -
getBegin
public int getBegin() -
setEnd
public void setEnd(int end) -
getEnd
public int getEnd() -
setStep
public void setStep(int step) -
getStep
public int getStep() -
setVar
-
getVar
-
setVarStatus
-
getVarStatus
-
getDataConverter
-
isEffective
protected boolean isEffective()Description copied from class:HtmlShadowElementReturns whether the shadow element is effective- Overrides:
isEffectivein classTemplateBasedShadowElement
-
compose
Description copied from class:HtmlShadowElementComposes the shadow element. It is called byHtmlShadowElement.afterCompose()if the shadow host is not null. Otherwise, it will skip this method call.The second invocation is ignored. If you want to recreate child components, use
HtmlShadowElement.recreate()instead.- Overrides:
composein classTemplateBasedShadowElement- Parameters:
host- the shadow host component, never null.
-
isDynamicValue
public boolean isDynamicValue()Description copied from interface:ShadowElementCtrlReturns whether the shadow element contains a dynamic value, it means the shadow element cannot be destroyed after evaluated.- Specified by:
isDynamicValuein interfaceShadowElementCtrl- Overrides:
isDynamicValuein classTemplateBasedShadowElement
-
getPropertyAccess
Description copied from interface:ComponentCtrlReturns the corresponding property access object from the given property name, if any.- Specified by:
getPropertyAccessin interfaceComponentCtrl- Overrides:
getPropertyAccessin classAbstractComponent- Parameters:
prop- the name of the property- Returns:
- null it means not to support for the property name.
-
removeFromParent
public void removeFromParent()- Overrides:
removeFromParentin classHtmlShadowElement
-
onParentChanged
Description copied from interface:ComponentCtrlCalled after the parent changed. Usually,ComponentCtrl.onPageDetached(Page)andComponentCtrl.onPageAttached(Page, Page)cover all the cases, unless its page is not changed.- Specified by:
onParentChangedin interfaceComponentCtrl- Overrides:
onParentChangedin classAbstractComponent- Parameters:
parent- the new parent. If null, it means detachment.
-