Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x 79d9f699a -> 8dd3133e7


WICKET-5658 AjaxFormComponentUpdatingBehavior should not clear the rawInput 
when updateModel is false


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

Branch: refs/heads/wicket-6.x
Commit: 8dd3133e7725873098e04f0de9bcd1284c42a70e
Parents: 79d9f69
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Wed Aug 6 14:25:10 2014 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Wed Aug 6 14:25:10 2014 +0200

----------------------------------------------------------------------
 .../wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/8dd3133e/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
index 8b3d7a5..5d0f704 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
@@ -144,9 +144,9 @@ public abstract class AjaxFormComponentUpdatingBehavior 
extends AjaxEventBehavio
                        formComponent.validate();
                        if (formComponent.isValid())
                        {
-                               formComponent.valid();
                                if (getUpdateModel())
                                {
+                                       formComponent.valid();
                                        formComponent.updateModel();
                                }
 
@@ -167,6 +167,10 @@ public abstract class AjaxFormComponentUpdatingBehavior 
extends AjaxEventBehavio
        }
 
        /**
+        * Gives the control to the application to decide whether the form 
component model should
+        * be updated automatically or not. Make sure to call {@link 
org.apache.wicket.markup.html.form.FormComponent#valid()}
+        * additionally in case the application want to update the model 
manually.
+        *
         * @return true if the model of form component should be updated, false 
otherwise
         */
        protected boolean getUpdateModel()

Reply via email to