Class 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:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addHeaderContribution​(IYuiContext context)
      Override this method to get access to the IYuiContext
      void bind​(org.apache.wicket.Component component)  
      protected org.apache.wicket.Component getComponent()  
      protected void onRenderHead​(org.apache.wicket.markup.head.IHeaderResponse response)
      Hook method for doing some custom renderHead logic.
      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
    • Constructor Detail

      • AbstractYuiBehavior

        public AbstractYuiBehavior()
    • Method Detail

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