Class AjaxIndicatorAppender
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.apache.wicket.extensions.ajax.markup.html.AjaxIndicatorAppender
-
- All Implemented Interfaces:
Serializable,org.apache.wicket.IComponentAwareEventSink,org.apache.wicket.markup.html.IComponentAwareHeaderContributor,org.apache.wicket.util.io.IClusterable
public class AjaxIndicatorAppender extends org.apache.wicket.behavior.Behavior
A behavior that adds a span with wicket's default indicator gif to the end of the component's markup. This span can be used as an ajax busy indicator. For an example usage seeIndicatingAjaxLinkInstances of this behavior must not be shared between components.
- Since:
- 1.2
- Author:
- Igor Vaynberg (ivaynberg)
- See Also:
IndicatingAjaxLink,IAjaxIndicatorAware, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AjaxIndicatorAppender()Construct.AjaxIndicatorAppender(org.apache.wicket.request.resource.ResourceReference indicator)Build a new instance specifying a custom busy indicator asResourceReference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterRender(org.apache.wicket.Component component)voidbind(org.apache.wicket.Component component)protected CharSequencegetIndicatorUrl()StringgetMarkupId()Returns the markup id attribute of the outer most span of this indicator.protected StringgetSpanClass()voidrenderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)
-
-
-
Constructor Detail
-
AjaxIndicatorAppender
public AjaxIndicatorAppender()
Construct.
-
AjaxIndicatorAppender
public AjaxIndicatorAppender(org.apache.wicket.request.resource.ResourceReference indicator)
Build a new instance specifying a custom busy indicator asResourceReference.- Parameters:
indicator- TheResourceReferenceto use as busy indicator.
-
-
Method Detail
-
renderHead
public void renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)
- Specified by:
renderHeadin interfaceorg.apache.wicket.markup.html.IComponentAwareHeaderContributor- Overrides:
renderHeadin classorg.apache.wicket.behavior.Behavior
-
afterRender
public void afterRender(org.apache.wicket.Component component)
- Overrides:
afterRenderin classorg.apache.wicket.behavior.Behavior
-
getIndicatorUrl
protected CharSequence getIndicatorUrl()
- Returns:
- url of the animated indicator image
-
getSpanClass
protected String getSpanClass()
- Returns:
- css class name of the generated outer span
-
getMarkupId
public String getMarkupId()
Returns the markup id attribute of the outer most span of this indicator. This is the id of the span that should be hidden or show to hide or show the indicator.- Returns:
- markup id of outer most span
-
bind
public final void bind(org.apache.wicket.Component component)
- Overrides:
bindin classorg.apache.wicket.behavior.Behavior
-
-