Class VolatileIStubsComponent

All Implemented Interfaces:
Serializable, Cloneable, Component, Scope, ComponentCtrl

public class VolatileIStubsComponent extends IStubsComponent
Internal use only.
Author:
jumperchen
See Also:
  • Constructor Details

    • VolatileIStubsComponent

      public VolatileIStubsComponent()
  • Method Details

    • replace

      public void replace(Component comp, boolean bFellow, boolean bListener, boolean bChildren)
      Description copied from class: StubComponent
      Replace the specified component with this component in the component tree. In other words, the parent of the given component will become the parent of this components, so are siblings and children. Furthermore, comp will be detached at the end.

      Notice that the replacement won't change anything at the client. A stub component assumes there is a full-functional widget running at the client to handle everything.

      Overrides:
      replace in class IStubsComponent
      Parameters:
      comp - the component. In this implementation it supports only derived classes of AbstractComponent.
      bFellow - whether to add this component to the map of fellows if it is assigned with an ID. If false, the component (comp) cannot be retrieved back even with an ID.
      bListener - whether to retain the event listeners and handlers. If true, the event listeners and handlers, if any, will be registered to this stub component. In other words, the event will be processed. However, it is a stub component, rather than the original one. I means the event is the most generic format: an instance of Event (rather than MouseEvent or others).
      bChildren - whether to have the children of the given component.
      If false, this component won't have any children, and all UUID of children reference back to this component.
      If true, the given component's children will belong to this component.
    • getWidgetClass

      public String getWidgetClass()
      Description copied from class: StubsComponent
      Returns the widget class, "#stubs".
      Specified by:
      getWidgetClass in interface Component
      Overrides:
      getWidgetClass in class StubsComponent
      See Also:
    • renderProperties

      protected void renderProperties(ContentRenderer renderer) throws 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:
      IOException