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 aIYuiContext
to register all required components. TheIYuiContext
is created by a (global)IYuiManager
which, in this case, lives inside thePage
(as anBehavior
) that is retrieved bycomponent.getPage()
Subclasses should override
addHeaderContribution(IYuiContext context)
to get access to theIYuiContext
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractYuiBehavior()
-
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 IYuiContextvoid
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.
-
-
-
Method Detail
-
bind
public void bind(org.apache.wicket.Component component)
- Overrides:
bind
in classorg.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 interfaceorg.apache.wicket.markup.html.IComponentAwareHeaderContributor
- Overrides:
renderHead
in classorg.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
-
-
-