|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.ajax.attributes.AjaxCallListener
public class AjaxCallListener
An adapter for implementations of IAjaxCallListener.
Constructor Summary | |
---|---|
AjaxCallListener()
|
Method Summary | |
---|---|
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)
Sets the JavaScript code that will be returned by getAfterHandler(Component) . |
AjaxCallListener |
onBefore(CharSequence before)
Sets the JavaScript code that will be returned by getBeforeHandler(Component) . |
AjaxCallListener |
onBeforeSend(CharSequence beforeSend)
Sets the JavaScript code that will be returned by getBeforeSendHandler(Component) . |
AjaxCallListener |
onComplete(CharSequence complete)
Sets the JavaScript code that will be returned by getCompleteHandler(Component) . |
AjaxCallListener |
onFailure(CharSequence failure)
Sets the JavaScript code that will be returned by getFailureHandler(Component) . |
AjaxCallListener |
onPrecondition(CharSequence precondition)
Sets the JavaScript code that will be returned by getPrecondition(Component) . |
AjaxCallListener |
onSuccess(CharSequence success)
Sets the JavaScript code that will be returned by getSuccessHandler(Component) . |
void |
renderHead(Component component,
IHeaderResponse response)
Render to the web response whatever the component-aware wants to contribute to the head section. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AjaxCallListener()
Method Detail |
---|
public AjaxCallListener onBefore(CharSequence before)
getBeforeHandler(Component)
.
If this code was already set, the new one will be appended to the existing one.
before
- the JavaScript code for the corresponding handler
public AjaxCallListener onBeforeSend(CharSequence beforeSend)
getBeforeSendHandler(Component)
.
If this code was already set, the new one will be appended to the existing one.
beforeSend
- the JavaScript code for the corresponding handler
public AjaxCallListener onAfter(CharSequence after)
getAfterHandler(Component)
.
If this code was already set, the new one will be appended to the existing one.
after
- the JavaScript code for the corresponding handler
public AjaxCallListener onSuccess(CharSequence success)
getSuccessHandler(Component)
.
If this code was already set, the new one will be appended to the existing one.
success
- the JavaScript code for the corresponding handler
public AjaxCallListener onFailure(CharSequence failure)
getFailureHandler(Component)
.
If this code was already set, the new one will be appended to the existing one.
failure
- the JavaScript code for the corresponding handler
public AjaxCallListener onComplete(CharSequence complete)
getCompleteHandler(Component)
.
If this code was already set, the new one will be appended to the existing one.
complete
- the JavaScript code for the corresponding handler
public AjaxCallListener onPrecondition(CharSequence precondition)
getPrecondition(Component)
.
If this code was already set, the new one will be appended to the existing one.
precondition
- the JavaScript code for the precondition
public CharSequence getSuccessHandler(Component component)
IAjaxCallListener
AjaxRequestAttributes.dataType
getSuccessHandler
in interface IAjaxCallListener
component
- the Component with the Ajax behavior
public CharSequence getFailureHandler(Component component)
IAjaxCallListener
getFailureHandler
in interface IAjaxCallListener
component
- the Component with the Ajax behavior
public CharSequence getBeforeHandler(Component component)
IAjaxCallListener
getBeforeHandler
in interface IAjaxCallListener
component
- the Component with the Ajax behavior
public CharSequence getBeforeSendHandler(Component component)
IAjaxCallListener
getBeforeSendHandler
in interface IAjaxCallListener
component
- the Component with the Ajax behavior
public CharSequence getAfterHandler(Component component)
IAjaxCallListener
AjaxRequestAttributes.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 IAjaxCallListener
component
- the Component with the Ajax behavior
public CharSequence getCompleteHandler(Component component)
IAjaxCallListener
getCompleteHandler
in interface IAjaxCallListener
component
- the Component with the Ajax behavior
public CharSequence getPrecondition(Component component)
IAjaxCallListener
false
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 IAjaxCallListener
component
- the Component with the Ajax behavior
public void renderHead(Component component, IHeaderResponse response)
IComponentAwareHeaderContributor
renderHead
in interface IComponentAwareHeaderContributor
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 object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |