|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.behavior.Behavior
org.apache.wicket.behavior.AbstractAjaxBehavior
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
org.apache.wicket.ajax.AbstractAjaxTimerBehavior
public abstract class AbstractAjaxTimerBehavior
A behavior that generates an AJAX update callback at a regular interval.
Field Summary |
---|
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
---|
INDICATOR |
Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener |
---|
INTERFACE |
Constructor Summary | |
---|---|
AbstractAjaxTimerBehavior(Duration updateInterval)
Construct. |
Method Summary | |
---|---|
protected String |
getJsTimeoutCall(Duration updateInterval)
|
Duration |
getUpdateInterval()
Returns the update interval |
boolean |
isStopped()
|
void |
onRemove(Component component)
Called to notify that the component is being removed from its parent |
protected abstract void |
onTimer(AjaxRequestTarget target)
Listener method for the AJAX timer event. |
void |
renderHead(Component component,
IHeaderResponse response)
Render to the web response whatever the component wants to contribute to the head section. |
protected void |
respond(AjaxRequestTarget target)
|
void |
restart(AjaxRequestTarget target)
Re-enables the timer if already stopped |
protected void |
setUpdateInterval(Duration updateInterval)
Sets the update interval duration. |
protected boolean |
shouldTrigger()
Decides whether the timer behavior should render its JavaScript to re-trigger it after the update interval. |
void |
stop(AjaxRequestTarget target)
Stops the timer |
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
---|
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, getChannel, getFailureScript, getPreconditionScript, getSuccessScript, onBind, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes, updateAjaxAttributes |
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior |
---|
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind |
Methods inherited from class org.apache.wicket.behavior.Behavior |
---|
beforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractAjaxTimerBehavior(Duration updateInterval)
updateInterval
- Duration between AJAX callbacksMethod Detail |
---|
protected final void setUpdateInterval(Duration updateInterval)
onTimer(AjaxRequestTarget)
method.
updateInterval
- public final Duration getUpdateInterval()
public void renderHead(Component component, IHeaderResponse response)
Behavior
renderHead
in interface IComponentAwareHeaderContributor
renderHead
in class AbstractDefaultAjaxBehavior
component
- component which is contributing to the response. This parameter is here to give
the component as the context for component-awares implementing this interfaceresponse
- Response objectBehavior.renderHead(Component,
org.apache.wicket.markup.head.IHeaderResponse)
protected final String getJsTimeoutCall(Duration updateInterval)
updateInterval
- Duration between AJAX callbacks
protected final void respond(AjaxRequestTarget target)
respond
in class AbstractDefaultAjaxBehavior
target
- The AJAX targetAbstractDefaultAjaxBehavior.respond(AjaxRequestTarget)
protected boolean shouldTrigger()
true
if the behavior is not stopped, it is enabled and still attached to
any component in the page or to the page itselfprotected abstract void onTimer(AjaxRequestTarget target)
target
- The request targetpublic final boolean isStopped()
true
if has been stopped via stop(AjaxRequestTarget)
public final void restart(AjaxRequestTarget target)
target
- public final void stop(AjaxRequestTarget target)
public void onRemove(Component component)
Behavior
onRemove
in class Behavior
component
- the removed component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |