Package org.zkoss.stateless.ui

## Class IStubComponent

- java.lang.Object
- - org.zkoss.zk.ui.AbstractComponent
  - - org.zkoss.zk.ui.sys.StubComponent
    - - org.zkoss.stateless.ui.IStubComponent

- All Implemented Interfaces:
    `java.io.Serializable`, `java.lang.Cloneable`, `Component`, `Scope`, `ComponentCtrl`

      public abstract class IStubComponent
      extends StubComponent

  A transient component for rendering `IComponent` to client.
  Author:
    jumperchen
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent

      `AbstractComponent.Children, AbstractComponent.ForwardInfo, AbstractComponent.TargetInfo`

  - ### 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

      `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
    Constructor | Description
    --- | ---
    `IStubComponent()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract void` | `addAction​(java.lang.String name, ActionHandler handler)` |
    `abstract IComponent` | `getOwner()` | Returns the immutable component.
    `java.lang.String` | `getStubonly()` | Returns whether this component is stub-only.
    `static IStubComponent` | `of​(IComponent root)` |
    `static IStubComponent` | `of​(Component root)` |
    `static java.lang.String` | `redraw​(IComponent root)` |
    `static java.lang.String` | `redraw​(IStubComponent root)` |
    `protected void` | `renderProperties​(ContentRenderer renderer)` | Called by (`ComponentCtrl.redraw(java.io.Writer)`) to render the properties, excluding the enclosing tag and children.

    - ### Methods inherited from class org.zkoss.zk.ui.sys.StubComponent

      `getId, getWidgetClass, replace, service, service`

    - ### 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, 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, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isChildable, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, response, response, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### IStubComponent

          public IStubComponent()

  - ### Method Detail

    - #### of

          public static IStubComponent of​(IComponent root)

    - #### of

          public static IStubComponent of​(Component root)

    - #### renderProperties

          protected void renderProperties​(ContentRenderer renderer)
                                   throws java.io.IOException

      Description copied from class: `AbstractComponent`
      Called by (`ComponentCtrl.redraw(java.io.Writer)`) to render the properties, excluding the enclosing tag and children.

      Default: it renders `AbstractComponent.getId()` if it was assigned, and event names if listened (and listed in `AbstractComponent.getClientEvents()`).

      Note: it doesn't render `AbstractComponent.getWidgetClass()`, `AbstractComponent.getUuid()` and `AbstractComponent.getMold()`, which are caller's job.

      Overrides:
        `renderProperties` in class `AbstractComponent`
      Throws:
        `java.io.IOException`

    - #### getOwner

          public abstract IComponent getOwner()

      Returns the immutable component.

    - #### getStubonly

          public java.lang.String getStubonly()

      Description copied from interface: `Component`
      Returns whether this component is stub-only. By stub-only, we mean we don't need to maintain the states of the component at the server side.

      There are three possible values: "true", "false", and "inherit", and "ignore-native".

      Notice that the native components will be stub-ized, no matter this property is set. Though rarely required, you could control whether to stub-ize the native components with a component attribute called `Attributes.STUB_NATIVE`.

      Specified by:
        `getStubonly` in interface `Component`
      Overrides:
        `getStubonly` in class `AbstractComponent`

    - #### redraw

          public static java.lang.String redraw​(IComponent root)
                                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### redraw

          public static java.lang.String redraw​(IStubComponent root)
                                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### addAction

          public abstract void addAction​(java.lang.String name,
                                         ActionHandler handler)