org.apache.wicket.ajax
Class AjaxSelfUpdatingTimerBehavior

java.lang.Object
  extended by org.apache.wicket.behavior.AbstractBehavior
      extended by org.apache.wicket.behavior.AbstractAjaxBehavior
          extended by org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
              extended by org.apache.wicket.ajax.AbstractAjaxTimerBehavior
                  extended by org.apache.wicket.ajax.AjaxSelfUpdatingTimerBehavior
All Implemented Interfaces:
Serializable, IBehavior, IBehaviorListener, IComponentConfigurationBehavior, IClusterable, IRequestListener, IHeaderContributor

public class AjaxSelfUpdatingTimerBehavior
extends AbstractAjaxTimerBehavior

Automatically re-renders the component it is attached to via AJAX at a regular interval.

Since:
1.2
Author:
Igor Vaynberg (ivaynberg)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
 
Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener
INTERFACE
 
Constructor Summary
AjaxSelfUpdatingTimerBehavior(Duration updateInterval)
          Construct.
 
Method Summary
protected  void onPostProcessTarget(AjaxRequestTarget target)
          Give the subclass a chance to add something to the target, like a javascript effect call.
protected  void onTimer(AjaxRequestTarget target)
          Listener method for the AJAX timer event.
 
Methods inherited from class org.apache.wicket.ajax.AbstractAjaxTimerBehavior
getCallbackScript, getJsTimeoutCall, getPreconditionScript, getUpdateInterval, isStopped, onlyTargetActivePage, renderHead, respond, setUpdateInterval, stop
 
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, generateCallbackScript, getAjaxCallDecorator, getCallbackScript, getChannelName, getFailureScript, getSuccessScript, onBind, onRequest, throttleScript
 
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
bind, getCallbackUrl, getCallbackUrl, getComponent, getImplementationId, getStatelessHint, onComponentRendered, onComponentTag, onComponentTag, onRendered, onRenderHeadContribution, onRenderHeadInitContribution
 
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior
afterRender, beforeRender, cleanup, detach, detachModel, exception, isEnabled, isTemporary, onConfigure, onException, rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AjaxSelfUpdatingTimerBehavior

public AjaxSelfUpdatingTimerBehavior(Duration updateInterval)
Construct.

Parameters:
updateInterval - Duration between AJAX callbacks
Method Detail

onTimer

protected final void onTimer(AjaxRequestTarget target)
Description copied from class: AbstractAjaxTimerBehavior
Listener method for the AJAX timer event.

Specified by:
onTimer in class AbstractAjaxTimerBehavior
Parameters:
target - The request target
See Also:
AbstractAjaxTimerBehavior.onTimer(org.apache.wicket.ajax.AjaxRequestTarget)

onPostProcessTarget

protected void onPostProcessTarget(AjaxRequestTarget target)
Give the subclass a chance to add something to the target, like a javascript effect call. Called after the hosting component has been added to the target.

Parameters:
target - The AJAX target


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.