public class AjaxCallListener extends Object implements IAjaxCallListener, IComponentAwareHeaderContributor
| Constructor and Description |
|---|
AjaxCallListener() |
| Modifier and Type | Method and Description |
|---|---|
CharSequence |
getAfterHandler(Component component)
The JavaScript that will be executed after the Ajax call.
|
CharSequence |
getBeforeHandler(Component component)
The JavaScript that will be executed before the Ajax call, as early as possible.
|
CharSequence |
getBeforeSendHandler(Component component)
The JavaScript that will be executed right before the execution of the the Ajax call, only if all
preconditions pass.
|
CharSequence |
getCompleteHandler(Component component)
The JavaScript that will be executed after both successful and unsuccessful return of the
Ajax call.
|
CharSequence |
getFailureHandler(Component component)
The JavaScript that will be executed after unsuccessful return of the Ajax call.
|
CharSequence |
getPrecondition(Component component)
A JavaScript function that is invoked before the request is being executed.
|
CharSequence |
getSuccessHandler(Component component)
The JavaScript that will be executed after successful return of the Ajax call.
|
AjaxCallListener |
onAfter(CharSequence after) |
AjaxCallListener |
onBefore(CharSequence before) |
AjaxCallListener |
onBeforeSend(CharSequence beforeSend) |
AjaxCallListener |
onComplete(CharSequence complete) |
AjaxCallListener |
onFailure(CharSequence failure) |
AjaxCallListener |
onPrecondition(CharSequence precondition) |
AjaxCallListener |
onSuccess(CharSequence success) |
void |
renderHead(Component component,
IHeaderResponse response)
Render to the web response whatever the component-aware wants to contribute to the head
section.
|
public AjaxCallListener onBefore(CharSequence before)
public AjaxCallListener onBeforeSend(CharSequence beforeSend)
public AjaxCallListener onAfter(CharSequence after)
public AjaxCallListener onSuccess(CharSequence success)
public AjaxCallListener onFailure(CharSequence failure)
public AjaxCallListener onComplete(CharSequence complete)
public AjaxCallListener onPrecondition(CharSequence precondition)
public CharSequence getSuccessHandler(Component component)
IAjaxCallListenerAjaxRequestAttributes.dataTypegetSuccessHandler in interface IAjaxCallListenercomponent - the Component with the Ajax behaviorpublic CharSequence getFailureHandler(Component component)
IAjaxCallListenergetFailureHandler in interface IAjaxCallListenercomponent - the Component with the Ajax behaviorpublic CharSequence getBeforeHandler(Component component)
IAjaxCallListenergetBeforeHandler in interface IAjaxCallListenercomponent - the Component with the Ajax behaviorpublic CharSequence getBeforeSendHandler(Component component)
IAjaxCallListenergetBeforeSendHandler in interface IAjaxCallListenercomponent - the Component with the Ajax behaviorpublic CharSequence getAfterHandler(Component component)
IAjaxCallListenerAjaxRequestAttributes.setAsynchronous(boolean)) then this JavaScript will be executed
after the complete handler,
otherwise it is executed right after the execution of the Ajax request.getAfterHandler in interface IAjaxCallListenercomponent - the Component with the Ajax behaviorpublic CharSequence getCompleteHandler(Component component)
IAjaxCallListenergetCompleteHandler in interface IAjaxCallListenercomponent - the Component with the Ajax behaviorpublic CharSequence getPrecondition(Component component)
IAjaxCallListenerfalse then the execution of the Ajax call will be cancelled. The script will be
executed in a function that receives the following parameters:
getPrecondition in interface IAjaxCallListenercomponent - the Component with the Ajax behaviorpublic void renderHead(Component component, IHeaderResponse response)
IComponentAwareHeaderContributorrenderHead in interface IComponentAwareHeaderContributorcomponent - 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 objectCopyright © 2006–2014 Apache Software Foundation. All rights reserved.