Updated Branches:
  refs/heads/master d1770dc6a -> 5de39f4ff

WICKET-5197 Rename AjaxRequestAttributes#allowDefault to #preventDefault

Add a comment why the default behavior of a submit button has to be prevented


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

Branch: refs/heads/master
Commit: 5de39f4ff4ab7eed613191149374b199dfc92692
Parents: d1770dc
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Mon Jan 13 14:26:15 2014 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Mon Jan 13 14:26:15 2014 +0200

----------------------------------------------------------------------
 .../apache/wicket/ajax/markup/html/form/AjaxFallbackButton.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/5de39f4f/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxFallbackButton.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxFallbackButton.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxFallbackButton.java
index 1279162..8536ab5 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxFallbackButton.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxFallbackButton.java
@@ -96,7 +96,10 @@ public abstract class AjaxFallbackButton extends Button
                        protected void 
updateAjaxAttributes(AjaxRequestAttributes attributes)
                        {
                                super.updateAjaxAttributes(attributes);
+
+                               // do not allow normal form submit to happen
                                attributes.setPreventDefault(true);
+
                                
AjaxFallbackButton.this.updateAjaxAttributes(attributes);
                        }
 

Reply via email to