You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by sv...@apache.org on 2015/07/08 13:45:25 UTC

wicket git commit: added new Ajax topics

Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x b3733ed2b -> 7fa49b9e3


added new Ajax topics


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/7fa49b9e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/7fa49b9e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/7fa49b9e

Branch: refs/heads/wicket-6.x
Commit: 7fa49b9e318350c357d1c8f3fb0057d317ed0756
Parents: b3733ed
Author: Sven Meier <sv...@apache.org>
Authored: Wed Jul 8 13:44:05 2015 +0200
Committer: Sven Meier <sv...@apache.org>
Committed: Wed Jul 8 13:44:58 2015 +0200

----------------------------------------------------------------------
 wicket-user-guide/src/docs/guide/ajax/ajax_5.gdoc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/7fa49b9e/wicket-user-guide/src/docs/guide/ajax/ajax_5.gdoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/docs/guide/ajax/ajax_5.gdoc b/wicket-user-guide/src/docs/guide/ajax/ajax_5.gdoc
index 5f4a145..0812288 100644
--- a/wicket-user-guide/src/docs/guide/ajax/ajax_5.gdoc
+++ b/wicket-user-guide/src/docs/guide/ajax/ajax_5.gdoc
@@ -15,7 +15,7 @@ mp | If the AJAX call involves the submission of a form, this flag indicates whe
 sc | The input name of the submitting component of the form |
 async | A boolean parameter that indicates if the AJAX call is asynchronous (true) or not. | true
 wr | Specifies the type of data returned by the AJAX call (XML, HTML, JSON, etc...). | XML
-bh, pre, bsh, ah, sh, fh, coh | This is a list of the listeners that are executed on client side (they are JavaScript scripts) during the lifecycle of an AJAX request. Each short name is the abbreviation of one of the methods defined in the interface IAjaxCallListener (see below). | An empty list
+ih, bh, pre, bsh, ah, sh, fh, coh, dh | This is a list of the listeners that are executed on client side (they are JavaScript scripts) during the lifecycle of an AJAX request. Each short name is the abbreviation of one of the methods defined in the interface IAjaxCallListener (see below). | An empty list
 {table}
 
 {note}
@@ -37,6 +37,7 @@ One of the attribute we may need to modify is the list of @IAjaxCallListeners@ r
 
 @IAjaxCallListener@ defines a set of methods which return the JavaScript code (as a @CharSequence@) that must be executed on client side when the AJAX request handling reaches a given stage:
 
+* *getInitHandler(Component)*: (backported from Wicket 7.x into @AjaxCallListener@) returns the JavaScript code that will be executed on initialization of the Ajax call, immediately after the causing event. The code is executed in a scope where it can use variable attrs, which is an array containing the JSON parameters passed to Wicket.Ajax.ajax.
 * *getBeforeHandler(Component)*: returns the JavaScript code that will be executed before any other handlers returned by IAjaxCallListener. The code is executed in a scope where it can use variable attrs, which is an array containing the JSON parameters passed to Wicket.Ajax.ajax. 
 * *getPrecondition(Component)*: returns the JavaScript code that will be used as precondition for the AJAX call. If the script returns false then neither the Ajax call nor the other handlers will be executed. The code is executed in a scope where it can use variable attrs, which is the same variable seen for getBeforeHandler. 
 * *getBeforeSendHandler(Component)*: returns the JavaScript code that will be executed just before the AJAX call is performed. The code is executed in a scope where it can use variables attrs, jqXHR and settings:
@@ -49,6 +50,8 @@ One of the attribute we may need to modify is the list of @IAjaxCallListeners@ r
 ** data is the data returned by the AJAX call. Its type depends on parameter wr (Wicket AJAX response).
 ** textStatus it's the status returned as text.
 * *getFailureHandler(Component)*: returns the JavaScript code that will be executed if the AJAX call has returned with a failure. The code is executed in a scope where it can use variable attrs, which is the same variable seen for getBeforeHandler. 
-* *getCompleteHandler(Component)*: returns the JavaScript that will be invoked after success or failure handler has been executed. The code is executed in a scope where it can use variables attrs, jqXHR and textStatus which are the same variables seen for getSuccessHandler. 
+* *getCompleteHandler(Component)*: returns the JavaScript that will be invoked after success or failure handler has been executed. The code is executed in a scope where it can use variables attrs, jqXHR and textStatus which are the same variables seen for getSuccessHandler.
+* *getDoneHandler(Component)*: (backported from Wicket 7.x into @AjaxCallListener@) returns the JavaScript code that will be executed after the Ajax call is done, regardless whether it was sent or not. The code is executed in a scope where it can use variable attrs, which is an array containing the JSON parameters passed to Wicket.Ajax.ajax.
+
 
 In the next paragraph we will see an example of custom @IAjaxCallListener@ designed to disable a component during AJAX request processing.