Package org.zkoss.zuti.zul
Class When
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,Component
,AfterCompose
,Scope
,ShadowElement
,ShadowElementCtrl
,ComponentCtrl
public class When extends If
A when tag is used for choose like a Java switch statement in that it lets you between a number of alternatives.- Since:
- 8.0.0
- Author:
- jumperchen
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlShadowElement
HtmlShadowElement.Direction
-
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
AbstractComponent.Children, AbstractComponent.ForwardInfo, AbstractComponent.TargetInfo
-
-
Field Summary
-
Fields inherited from class org.zkoss.zuti.zul.TemplateBasedShadowElement
_dirtyBinding, ON_BINDING_READY, SHADOW_VARIABLE
-
Fields inherited from class org.zkoss.zk.ui.HtmlShadowElement
_afterComposed, _dynamicValue, BIND_ANNO, BINDER, INIT_ANNO, LOAD_ANNO, ON_REBUILD_SHADOW_TREE_LATER, REFERENCE_ANNO, SAVE_ANNO, SKIP_DISTRIBUTED_CHILDREN_PROPERTY_CHANGE
-
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
-
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, 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 Constructor Description When()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beforeParentChanged(Component parent)
Default: If parent is null, execute the @Destroy method if any.void
recreate()
Detaches all child components and then recreate them by use ofHtmlShadowElement.compose(org.zkoss.zk.ui.Component)
.protected void
recreateDirectly()
java.lang.Object
removeAttribute(java.lang.String name)
Removes the custom attribute associated with this component, i.e.,Component.COMPONENT_SCOPE
.java.lang.Object
setAttribute(java.lang.String name, java.lang.Object value)
Sets the custom attribute associated with this component, i.e.,Component.COMPONENT_SCOPE
.-
Methods inherited from class org.zkoss.zuti.zul.If
getPropertyAccess, getTest, isEffective, isTest, setTest
-
Methods inherited from class org.zkoss.zuti.zul.TemplateBasedShadowElement
addBindingListener, afterCompose, clone, compose, detach, docheck0, isBindingReady, isDirtyBinding, isDynamicValue, onChildAdded, onChildRemoved, rebuildSubShadowTree, removeBindingListener
-
Methods inherited from class org.zkoss.zk.ui.HtmlShadowElement
afterHostChildAdded, afterHostChildRemoved, asShadow, beforeChildAdded, beforeHostChildAdded, beforeHostChildRemoved, beforeHostParentChanged, clearChildren, destroyIndexCacheMap, getDistributedChildren, getFirstInsertion, getIndex, getIndexCacheMap, getLastInsertion, getNextInsertion, getNextInsertionComponentIfAny, getPreviousInsertion, getPreviousInsertionComponentIfAny, getShadowHost, getShadowHostIfAny, initClone, initIndexCacheMap, inRange, invalidate, isDynamicValue, mergeSubTree, mergeToHost, onHostAttached, onHostChildAdded, onHostChildRemoved, onHostDetached, removeFromParent, resolveVariable, setDynamicValue, setParent, setPrevInsertion, setShadowHost, shrinkRange, stretchRange, toString, updateFirstInsertion, updateLastInsertion, updateNextInsertion, updatePreviousInsertion, updateSubBindingAnnotationCount
-
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, 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, 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, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, 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, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, updateByClient, willPassivate, willPassivate, willSerialize, willSerialize
-
-
-
-
Method Detail
-
setAttribute
public java.lang.Object setAttribute(java.lang.String name, java.lang.Object value)
Description copied from interface:Component
Sets the custom attribute associated with this component, i.e.,Component.COMPONENT_SCOPE
.- Specified by:
setAttribute
in interfaceComponent
- Specified by:
setAttribute
in interfaceScope
- Overrides:
setAttribute
in classAbstractComponent
- Returns:
- the previous value associated with the attribute, if any
-
removeAttribute
public java.lang.Object removeAttribute(java.lang.String name)
Description copied from interface:Component
Removes the custom attribute associated with this component, i.e.,Component.COMPONENT_SCOPE
.- Specified by:
removeAttribute
in interfaceComponent
- Specified by:
removeAttribute
in interfaceScope
- Overrides:
removeAttribute
in classAbstractComponent
- Returns:
- the previous value associated with the attribute, if any,
-
recreate
public void recreate()
Description copied from class:HtmlShadowElement
Detaches all child components and then recreate them by use ofHtmlShadowElement.compose(org.zkoss.zk.ui.Component)
.- Specified by:
recreate
in interfaceShadowElement
- Overrides:
recreate
in classHtmlShadowElement
-
recreateDirectly
protected void recreateDirectly()
-
beforeParentChanged
public void beforeParentChanged(Component parent)
Description copied from class:AbstractComponent
Default: If parent is null, execute the @Destroy method if any.- Specified by:
beforeParentChanged
in interfaceComponentCtrl
- Overrides:
beforeParentChanged
in classHtmlShadowElement
- Parameters:
parent
- the new parent. If null, it means detachment.- See Also:
ComponentCtrl.beforeParentChanged(org.zkoss.zk.ui.Component)
-
-