Class AbstractYuiBehavior

java.lang.Object
org.apache.wicket.behavior.Behavior
org.hippoecm.frontend.plugins.yui.AbstractYuiBehavior
All Implemented Interfaces:
Serializable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable
Direct Known Subclasses:
AjaxIndicatorBehavior, PageLayoutBehavior, ToggleBehavior, WidgetBehavior, YuiDatePicker

public class AbstractYuiBehavior extends org.apache.wicket.behavior.Behavior
Base class for behaviors that want to use YUI modules. It uses a IYuiContext to register all required components. The IYuiContext is created by a (global) IYuiManager which, in this case, lives inside the Page (as an Behavior) that is retrieved by component.getPage()

Subclasses should override addHeaderContribution(IYuiContext context) to get access to the IYuiContext.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Override this method to get access to the IYuiContext
    void
    bind(org.apache.wicket.Component component)
     
    protected org.apache.wicket.Component
     
    protected void
    onRenderHead(org.apache.wicket.markup.head.IHeaderResponse response)
    Hook method for doing some custom renderHead logic.
    final void
    renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)
    Don't call super since WicketAjax is loaded by Yui webapp behavior TODO: webapp ajax is configurable, maybe check here and still load it.

    Methods inherited from class org.apache.wicket.behavior.Behavior

    afterRender, beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onComponentTag, onConfigure, onEvent, onException, onRemove, onTag, unbind

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractYuiBehavior

      public AbstractYuiBehavior()
  • Method Details

    • bind

      public void bind(org.apache.wicket.Component component)
      Overrides:
      bind in class org.apache.wicket.behavior.Behavior
    • getComponent

      protected org.apache.wicket.Component getComponent()
    • addHeaderContribution

      public void addHeaderContribution(IYuiContext context)
      Override this method to get access to the IYuiContext
      Parameters:
      context - The IYuiContext this behavior can use to register YUI-modules and the likes.
    • renderHead

      public final void renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)
      Don't call super since WicketAjax is loaded by Yui webapp behavior TODO: webapp ajax is configurable, maybe check here and still load it.
      Specified by:
      renderHead in interface org.apache.wicket.markup.html.IComponentAwareHeaderContributor
      Overrides:
      renderHead in class org.apache.wicket.behavior.Behavior
    • onRenderHead

      protected void onRenderHead(org.apache.wicket.markup.head.IHeaderResponse response)
      Hook method for doing some custom renderHead logic.
      Parameters:
      response -