Repository: wicket
Updated Branches:
  refs/heads/master 1d740488b -> 73006a7b6


WICKET-5879 Using an AjaxSubmitLink to hide its form results in an exception


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

Branch: refs/heads/master
Commit: 73006a7b6886dec358976f7ffe2fdb3b2714a4a3
Parents: 1d74048
Author: Andrea Del Bene <[email protected]>
Authored: Mon Apr 13 22:17:17 2015 +0200
Committer: Andrea Del Bene <[email protected]>
Committed: Mon Apr 13 22:17:17 2015 +0200

----------------------------------------------------------------------
 .../org/apache/wicket/ajax/markup/html/form/AjaxSubmitLink.java    | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/73006a7b/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitLink.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitLink.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitLink.java
index 9f2b3b9..5f564eb 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitLink.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitLink.java
@@ -101,6 +101,8 @@ public abstract class AjaxSubmitLink extends 
AbstractSubmitLink
                        protected void 
updateAjaxAttributes(AjaxRequestAttributes attributes)
                        {
                                super.updateAjaxAttributes(attributes);
+                               //prevent the default form submit
+                               attributes.setPreventDefault(true);
                                
AjaxSubmitLink.this.updateAjaxAttributes(attributes);
                        }
 

Reply via email to