Class AbstractRenderService<T>

java.lang.Object
org.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.panel.Panel
org.hippoecm.frontend.service.render.AbstractRenderService<T>
All Implemented Interfaces:
Serializable, Iterable<org.apache.wicket.Component>, EventListener, org.apache.wicket.event.IEventSink, org.apache.wicket.event.IEventSource, org.apache.wicket.feedback.IFeedbackContributor, org.apache.wicket.IConverterLocator, org.apache.wicket.IMetadataContext<Serializable,org.apache.wicket.Component>, org.apache.wicket.IQueueRegion, org.apache.wicket.markup.html.IHeaderContributor, org.apache.wicket.request.component.IRequestableComponent, org.apache.wicket.util.IHierarchical<org.apache.wicket.Component>, org.apache.wicket.util.io.IClusterable, IObserver, IRenderService
Direct Known Subclasses:
ListRenderService, RenderService

public abstract class AbstractRenderService<T> extends org.apache.wicket.markup.html.panel.Panel implements IObserver, IRenderService
Utility class that bundles a lot of the functionality needed for visual plugins. It registers an IRenderService, with itself as the Component.

The configuration parameters are as follows, with the class of the expected service between brackets:

  • wicket.model (IModelReference) The IModel that is available with the getModel() method, is the model that is provided by a IModelReference service. The name for this service can be found in the configuration with the wicket.model key. When the model is changed with setModel(), this change is propagated to the IModelReference service. When another plugin changes the model or the model object changes, the Component#onModelChanged() method is invoked. It is recommended to override this method to respond to changes.
  • wicket.id (IRenderService) The primary task of the RenderPlugin is to provide an IRenderService implementation.
  • wicket.extensions (IRenderService) A list of service names for child render services. These child services will be added to the plugin directly.
  • wicket.behavior A list of service names for IBehaviorServices. The behaviors that are exposed by these services are added to the Component.
  • wicket.variant (Layout) The layout variantion to use. In contrast with Wickets default, the variation is not inherited from the parent.
  • wicket.skin (CSS stylesheet) An array of stylesheets that will be added to the HTML head.
  • wicket.css (CSS) An array of CSS class names that will be added to the Component that is provided by this render service.
  • wicket.feedback (Feedback) The feedback service id. When specified, a IFeedbackMessageFilter that accepts messages generated by the component is registered with this id.
  • wicket.feedback.scope (FeedbackScope) The feedback reporting scope. Only messages with the configured scope will be reported by the registered message filter.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    Base class for extension points.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     

    Fields inherited from class org.apache.wicket.markup.html.panel.Panel

    PANEL

    Fields inherited from class org.apache.wicket.Component

    ENABLE, FLAG_INITIALIZED, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    void
    bind(IRenderService parent, String wicketId)
    Bind the component to the specified id.
    Create an extension point with the specified name.
    void
    Set focus on the specified child.
    protected String
     
    org.apache.wicket.Component
    The Wicket Component that is added to the parent.
    protected IDialogService
    Utility method to retrieve the IDialogService} from the plugin framework.
    getMarkupId(boolean createIfDoesNotExist)
     
    org.apache.wicket.model.IModel<T>
     
     
    The observable that the observer is interested in.
    The parent service for this render service.
    protected IPluginConfig
    The IPluginConfig that was used to create the service.
    protected IPluginContext
    The IPluginContext that was used to create the service.
    protected final ResourceBundleModel
     
     
     
    boolean
     
    protected void
     
    protected void
     
    void
    onComponentTag(org.apache.wicket.markup.ComponentTag tag)
     
    void
    onComponentTagBody(org.apache.wicket.markup.MarkupStream markupStream, org.apache.wicket.markup.ComponentTag openTag)
     
    void
    Callback that is invoked when the observable sends events.
    protected void
    Utility method for subclasses to redraw the complete Panel.
    protected void
     
    void
    Called after user events and JCR events have been handled, but before the rendering has started.
    org.apache.wicket.MarkupContainer
    setDefaultModel(org.apache.wicket.model.IModel<?> model)
     
    final void
    setModel(org.apache.wicket.model.IModel<T> model)
     
    final void
    setModelObject(T object)
     
    void
    Releases the component.
    final void
    updateModel(org.apache.wicket.model.IModel model)
     

    Methods inherited from class org.apache.wicket.markup.html.panel.Panel

    getRegionMarkup, newMarkupSourcingStrategy

    Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer

    getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession

    Methods inherited from class org.apache.wicket.MarkupContainer

    add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onDetach, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, size, stream, streamChildren, toString, toString, visitChildren, visitChildren

    Methods inherited from class org.apache.wicket.Component

    add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMarkupTag, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.apache.wicket.IQueueRegion

    dequeue, newDequeueContext

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

  • Constructor Details

  • Method Details

    • getModel

      public org.apache.wicket.model.IModel<T> getModel()
    • getModelObject

      public T getModelObject()
    • setModel

      public final void setModel(org.apache.wicket.model.IModel<T> model)
    • setModelObject

      public final void setModelObject(T object)
    • isActive

      public boolean isActive()
    • setDefaultModel

      public org.apache.wicket.MarkupContainer setDefaultModel(org.apache.wicket.model.IModel<?> model)
      Overrides:
      setDefaultModel in class org.apache.wicket.MarkupContainer
    • updateModel

      public final void updateModel(org.apache.wicket.model.IModel model)
    • getObservable

      public IObservable getObservable()
      Description copied from interface: IObserver
      The observable that the observer is interested in. This observable may not change, w.r.t. the IObservable.equals(java.lang.Object) method, while the observer is registered.
      Specified by:
      getObservable in interface IObserver<T>
    • onEvent

      public void onEvent(Iterator event)
      Description copied from interface: IObserver
      Callback that is invoked when the observable sends events. The iterator is guaranteed to be non-empty.
      Specified by:
      onEvent in interface IObserver<T>
    • getVariation

      public String getVariation()
      Overrides:
      getVariation in class org.apache.wicket.Component
    • getPluginContext

      protected IPluginContext getPluginContext()
      The IPluginContext that was used to create the service.
    • getPluginConfig

      protected IPluginConfig getPluginConfig()
      The IPluginConfig that was used to create the service.
    • redraw

      protected void redraw()
      Utility method for subclasses to redraw the complete Panel. When invoked during request processing or event handling, the service will be rendered during the rendering phase.

      For more fine-grained redrawing, subclasses should override the render(PluginRequestTarget) method.

    • addExtensionPoint

      protected void addExtensionPoint(String extension)
    • createExtensionPoint

      protected abstract AbstractRenderService<T>.ExtensionPoint createExtensionPoint(String extension)
      Create an extension point with the specified name.
    • removeExtensionPoint

      protected void removeExtensionPoint(String name)
    • getDialogService

      protected IDialogService getDialogService()
      Utility method to retrieve the IDialogService} from the plugin framework. The dialog service is guaranteed to be available.
    • onComponentTag

      public void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
      Overrides:
      onComponentTag in class org.apache.wicket.Component
    • getComponent

      public org.apache.wicket.Component getComponent()
      The Wicket Component that is added to the parent. The component must have the id that was set with the IRenderService.bind(IRenderService, String) method.
      Specified by:
      getComponent in interface IRenderService
    • render

      public void render(PluginRequestTarget target)
      Called after user events and JCR events have been handled, but before the rendering has started. Plugins can register Components with the request target to enlist in the rendering phase.

      Implementations that use extensions must call the same method on those.

      Specified by:
      render in interface IRenderService
    • focus

      public void focus(IRenderService child)
      Set focus on the specified child. Implementations should make the child visible when they themselves are visible, or become visible later.
      Specified by:
      focus in interface IRenderService
      Parameters:
      child - The extension that requests focus. This parameter can be null, in which case the Component should set focus to itself.
    • getId

      public String getId()
      Specified by:
      getId in interface org.apache.wicket.request.component.IRequestableComponent
      Overrides:
      getId in class org.apache.wicket.Component
    • getMarkupId

      public String getMarkupId(boolean createIfDoesNotExist)
      Overrides:
      getMarkupId in class org.apache.wicket.Component
    • getSession

      public UserSession getSession()
      Overrides:
      getSession in class org.apache.wicket.Component
    • bind

      public void bind(IRenderService parent, String wicketId)
      Description copied from interface: IRenderService
      Bind the component to the specified id. Provides the render service with a reference to the parent render service.
      Specified by:
      bind in interface IRenderService
    • unbind

      public void unbind()
      Description copied from interface: IRenderService
      Releases the component. Implementations cannot use the parent reference after this method has been invoked.
      Specified by:
      unbind in interface IRenderService
    • getParentService

      public IRenderService getParentService()
      The parent service for this render service.
      Specified by:
      getParentService in interface IRenderService
    • getResourceBundleModel

      protected final ResourceBundleModel getResourceBundleModel(String key, Locale locale)
    • getBundleName

      protected String getBundleName()
    • onBeforeRender

      protected void onBeforeRender()
      Overrides:
      onBeforeRender in class org.apache.wicket.Component
    • onAfterRender

      protected void onAfterRender()
      Overrides:
      onAfterRender in class org.apache.wicket.Component
    • onComponentTagBody

      public void onComponentTagBody(org.apache.wicket.markup.MarkupStream markupStream, org.apache.wicket.markup.ComponentTag openTag)
      Overrides:
      onComponentTagBody in class org.apache.wicket.MarkupContainer