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 2016/01/28 14:33:29 UTC

[1/2] wicket git commit: wicket-ajax-jquery: supply additional args to fh function to match AbstractDefaultAjaxBehavior.FAILURE_HANDLER_FUNCTION_TEMPLATE

Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x 7c6bfec60 -> ac21758f3


wicket-ajax-jquery: supply additional args to fh function to match
AbstractDefaultAjaxBehavior.FAILURE_HANDLER_FUNCTION_TEMPLATE


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

Branch: refs/heads/wicket-6.x
Commit: 5add8052bc29bc892c8d04bd41a79ce3198d1859
Parents: 7c6bfec
Author: Sander Evers <sa...@topicus.nl>
Authored: Thu Jan 28 13:31:26 2016 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Jan 28 14:33:08 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/5add8052/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 0ca428c..a03a3f3 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
@@ -1123,7 +1123,7 @@
 					Wicket.Log.error("Wicket.Ajax.Call.failure: Error while parsing response: " + errorMessage);
 				}
 				var attrs = context.attrs;
-				this._executeHandlers(attrs.fh, attrs, errorMessage);
+				this._executeHandlers(attrs.fh, attrs, jqXHR, errorMessage, textStatus);
 				Wicket.Event.publish(Wicket.Event.Topic.AJAX_CALL_FAILURE, attrs, jqXHR, errorMessage, textStatus);
 
 				return FunctionsExecuter.DONE;


[2/2] wicket git commit: WICKET-6084 ajax request failure handler receives incorrect arguments

Posted by mg...@apache.org.
WICKET-6084 ajax request failure handler receives incorrect arguments

Add unit tests


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

Branch: refs/heads/wicket-6.x
Commit: ac21758f358c42322efa9cc28bd0ac6dc26fdb01
Parents: 5add805
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Jan 28 14:32:00 2016 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Jan 28 14:33:16 2016 +0100

----------------------------------------------------------------------
 wicket-core/src/test/js/ajax.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/ac21758f/wicket-core/src/test/js/ajax.js
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/js/ajax.js b/wicket-core/src/test/js/ajax.js
index fecde0f..2d237fd 100644
--- a/wicket-core/src/test/js/ajax.js
+++ b/wicket-core/src/test/js/ajax.js
@@ -385,7 +385,7 @@ jQuery(document).ready(function() {
 
 		asyncTest('verify arguments to IAjaxCallListener handlers. Failure scenario.', function () {
 
-			expect(10);
+			expect(13);
 
 			var attrs = {
 				u: 'data/ajax/nonExisting.json',
@@ -400,9 +400,12 @@ jQuery(document).ready(function() {
 					}
 				],
 				fh: [
-					function(attributes) {
+					function(attributes, jqXHR, errorMessage, textStatus) {
 						start();
 						equal(attrs.u, attributes.u);
+						ok(typeof(jqXHR.success) === "function", "jqXHR should be passed");
+						equal(errorMessage, "Not Found", "Error message should be passed");
+						equal(textStatus, "error", "Text status should be passed");
 					}
 				],
 				bsh: [