You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2012/07/24 13:28:50 UTC

[3/3] git commit: WICKET-4668 Ajax responses for QUEUE and DROP type channels are not guaranteed to be processed in the order of the requests

WICKET-4668 Ajax responses for QUEUE and DROP type channels are not guaranteed to be processed in the order of the requests

Always run the global callback handlers after the call specific ones.


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

Branch: refs/heads/master
Commit: 9774c87f8810f8b66a1a32e1c6d461b1ed457f9b
Parents: bc9ff1f
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Tue Jul 24 14:13:17 2012 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Tue Jul 24 14:13:17 2012 +0300

----------------------------------------------------------------------
 .../wicket/ajax/res/js/wicket-ajax-jquery.js       |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/9774c87f/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
index 7b47440..2bfbbda 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
@@ -467,8 +467,8 @@
 				headers["Wicket-FocusedElementId"] = Wicket.Focus.lastFocusId;
 			}
 
-			Wicket.Event.publish('/ajax/call/before', attrs);
 			self._executeHandlers(attrs.bh, attrs);
+			Wicket.Event.publish('/ajax/call/before', attrs);
 
 			if (attrs.mp) { // multipart form. jQuery doesn't help here ...
 				// TODO Wicket.next - should we execute all handlers ?!
@@ -552,8 +552,8 @@
 						}
 					}
 
-					Wicket.Event.publish('/ajax/call/beforeSend', attrs, jqXHR, settings);
 					self._executeHandlers(attrs.bsh, attrs, jqXHR, settings);
+					Wicket.Event.publish('/ajax/call/beforeSend', attrs, jqXHR, settings);
 
 					if (attrs.i) {
 						// show the indicator
@@ -567,7 +567,6 @@
 				cache: false,
 				headers: headers,
 				success: function(data, textStatus, jqXHR) {
-
 					if (attrs.wr) {
 						self.processAjaxResponse(data, textStatus, jqXHR, context);
 					} else {
@@ -589,6 +588,7 @@
 						Wicket.Event.publish('/ajax/call/complete', attrs, jqXHR, textStatus);
 
 						self.done();
+
 					}, self));
 
 					var executer = new FunctionsExecuter(context.steps);

http://git-wip-us.apache.org/repos/asf/wicket/blob/9774c87f/wicket-core/src/test/js/data/ajax/emptyAjaxResponse.xml
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/js/data/ajax/emptyAjaxResponse.xml b/wicket-core/src/test/js/data/ajax/emptyAjaxResponse.xml
new file mode 100644
index 0000000..e69de29