org.zkoss.zk.ui.sys
Class StubsComponent

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.sys.StubComponent
          extended by org.zkoss.zk.ui.sys.StubsComponent
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Component, Scope, ComponentCtrl

public class StubsComponent
extends StubComponent

Represents a tree of StubComponent that are merged into a single component.

Since:
6.0.0
Author:
tomyeh
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
AbstractComponent.Children
 
Field Summary
 
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
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
 
Constructor Summary
StubsComponent()
           
 
Method Summary
 java.lang.String getId(java.lang.String uuid)
          Returns ID of the given UUID, or null if not found or no ID assigned.
 java.lang.String getWidgetClass()
          Returns the widget class, "#stubs".
protected  boolean isChildable()
          StubsComponent represents a collection of StubComponent, so it does not allow any child.
 void onChildrenMerged(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.
 void onPageAttached(Page newpage, Page oldpage)
          Default: handles special event listeners.
 void onPageDetached(Page page)
          Default: handles special event listeners.
 void service(Event event, Scope scope)
          Handles an event.
 java.lang.String toString()
           
 
Methods inherited from class org.zkoss.zk.ui.sys.StubComponent
replace, service
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addScopeListener, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, clone, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getExtraCtrl, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, renderProperties, response, response, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, updateByClient, willPassivate, willPassivate, willSerialize, willSerialize
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StubsComponent

public StubsComponent()
Method Detail

onChildrenMerged

public void onChildrenMerged(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.

Parameters:
replaced - the component that this component will replace.
Throws:
java.lang.IllegalStateException - if this method has been called twice (we can modify the algorithm to support but not worth).

getId

public java.lang.String getId(java.lang.String uuid)
Description copied from class: StubComponent
Returns 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:
getId in class StubComponent

onPageAttached

public void onPageAttached(Page newpage,
                           Page oldpage)
Description copied from class: AbstractComponent
Default: handles special event listeners.

Specified by:
onPageAttached in interface ComponentCtrl
Overrides:
onPageAttached in class AbstractComponent
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:
ComponentCtrl.onPageAttached(org.zkoss.zk.ui.Page, org.zkoss.zk.ui.Page)

onPageDetached

public void onPageDetached(Page page)
Description copied from class: AbstractComponent
Default: handles special event listeners.

Specified by:
onPageDetached in interface ComponentCtrl
Overrides:
onPageDetached in class AbstractComponent
Parameters:
page - the previous page (never null)
See Also:
ComponentCtrl.onPageDetached(org.zkoss.zk.ui.Page)

service

public void service(Event event,
                    Scope scope)
             throws java.lang.Exception
Description copied from interface: ComponentCtrl
Handles 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:
service in interface ComponentCtrl
Overrides:
service in class StubComponent
Parameters:
event - the event to handle
scope - the scope to evaluate the zscript, if any. (see also Page.interpret(java.lang.String, java.lang.String, org.zkoss.zk.ui.ext.Scope).
Throws:
java.lang.Exception

getWidgetClass

public java.lang.String getWidgetClass()
Returns the widget class, "#stubs".

Specified by:
getWidgetClass in interface Component
Overrides:
getWidgetClass in class StubComponent
See Also:
Component.setWidgetClass(java.lang.String)

isChildable

protected boolean isChildable()
StubsComponent represents a collection of StubComponent, so it does not allow any child.

Overrides:
isChildable in class AbstractComponent

toString

public java.lang.String toString()
Overrides:
toString in class AbstractComponent


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo