Package org.zkoss.zk.ui.sys
Class StubsComponent
java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.sys.StubComponent
org.zkoss.zk.ui.sys.StubsComponent
- All Implemented Interfaces:
Serializable,Cloneable,Component,Scope,ComponentCtrl
Represents a tree of
StubComponent that are merged into
a single component.- Since:
- 6.0.0
- Author:
- tomyeh
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
AbstractComponent.Children, AbstractComponent.ForwardInfo, AbstractComponent.TargetInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object[][][0]: uuid, [1]: EventListenerMap.protected String[][][0]: uuid, [1]: idprotected String[]Fields 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 TypeMethodDescriptionReturns ID of the given UUID, or null if not found or no ID assigned.Returns the widget class, "#stubs".protected booleanStubsComponentrepresents a collection ofStubComponent, so it does not allow any child.protected voidmapChildren(DesktopCtrl desktopCtrl, List<String> uuids, List<String[]> idmap, List<Object[]> evtmap, Component comp) voidonChildrenMerged(Component replaced, boolean bListener) Called when this component replaced the given component, and the children of the given component shall be 'merged' to this component.voidonPageAttached(Page newpage, Page oldpage) Default: handles special event listeners.voidonPageDetached(Page page) Default: handles special event listeners.voidHandles an event.toString()Methods inherited from class org.zkoss.zk.ui.sys.StubComponent
replace, serviceMethods 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, clone, 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, getExtraCtrl, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getPropertyAccess, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getStubonlyDescendants, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderProperties, renderPropertiesOnly, response, response, response, 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, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
Field Details
-
_uuids
-
_idmap
[0]: uuid, [1]: id -
_evtmap
[0]: uuid, [1]: EventListenerMap.
-
-
Constructor Details
-
StubsComponent
public StubsComponent()
-
-
Method Details
-
onChildrenMerged
Called when this component replaced the given component, and the children of the given component shall be 'merged' to this component.- Parameters:
replaced- the component that this component will replace.- Throws:
IllegalStateException- if this method has been called twice (we can modify the algorithm to support but not worth).
-
mapChildren
-
getId
Description copied from class:StubComponentReturns ID of the given UUID, or null if not found or no ID assigned. It assumes the given UUID belonged to one of the component being merged into this component.Notice that it searches all descendants of this component.
- Overrides:
getIdin classStubComponent
-
onPageAttached
Description copied from class:AbstractComponentDefault: handles special event listeners.- Specified by:
onPageAttachedin interfaceComponentCtrl- Overrides:
onPageAttachedin classAbstractComponent- Parameters:
newpage- the new page (never null).oldpage- the previous page, if any, or null if it didn't belong to any page.- See Also:
-
onPageDetached
Description copied from class:AbstractComponentDefault: handles special event listeners.- Specified by:
onPageDetachedin interfaceComponentCtrl- Overrides:
onPageDetachedin classAbstractComponent- Parameters:
page- the previous page (never null)- See Also:
-
service
Description copied from interface:ComponentCtrlHandles an event. This method will invoke the event handlers registered in a ZUML page, the event listeners registered in Java, and the event handlers declared as part of the component.- Specified by:
servicein interfaceComponentCtrl- Overrides:
servicein classStubComponent- Parameters:
event- the event to handlescope- the scope to evaluate the zscript, if any. (see alsoPage.interpret(java.lang.String, java.lang.String, org.zkoss.zk.ui.ext.Scope).- Throws:
Exception
-
getWidgetClass
Returns the widget class, "#stubs".- Specified by:
getWidgetClassin interfaceComponent- Overrides:
getWidgetClassin classStubComponent- See Also:
-
isChildable
protected boolean isChildable()StubsComponentrepresents a collection ofStubComponent, so it does not allow any child.- Overrides:
isChildablein classAbstractComponent
-
toString
- Overrides:
toStringin classAbstractComponent
-