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/04/02 09:38:04 UTC

git commit: WICKET-4482 Regression in OnChangeAjaxBehavior

Updated Branches:
  refs/heads/master 64455a133 -> 5bff86821


WICKET-4482 Regression in OnChangeAjaxBehavior

Use both 'inputchange' and 'change' events for OnChangeAjaxBehavior. This way it behaves as in 1.5


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

Branch: refs/heads/master
Commit: 5bff8682177fe87d9152e37f46b18d41dc005eb7
Parents: 64455a1
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Apr 2 09:36:24 2012 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Apr 2 09:36:24 2012 +0200

----------------------------------------------------------------------
 .../wicket/ajax/form/OnChangeAjaxBehavior.java     |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/5bff8682/wicket-core/src/main/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavior.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavior.java b/wicket-core/src/main/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavior.java
index 56b404d..965ae56 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavior.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavior.java
@@ -21,10 +21,12 @@ import org.apache.wicket.markup.html.form.FormComponent;
 /**
  * A behavior that updates the hosting {@link FormComponent} via Ajax when value of the component is
  * changed.
- * 
+ * <p>
  * This behavior uses best available method to track changes on different types of form components.
- * To accomplish this it uses a custom event, named 'inputchange', that is handled in the best way
- * for the specific browser.
+ * To accomplish this for text input form components it uses a custom event, named 'inputchange',
+ * that is handled in the best way for the specific browser. For other form component types the
+ * 'change' event is used.
+ * </p>
  * 
  * @author Janne Hietam&auml;ki (janne)
  * 
@@ -36,10 +38,11 @@ public abstract class OnChangeAjaxBehavior extends AjaxFormComponentUpdatingBeha
 	private static final long serialVersionUID = 1L;
 
 	/**
-	 * The name of the special event that delegates to 'input', 'keyup', 'cut' and 'paste' events
-	 * depending on the browser.
+	 * 'inputchange' event delegates to 'input', 'keyup', 'cut' and 'paste' events
+	 * for text input form component depending on the browser.
+	 * 'change' is used as a fallback for all other form component types.
 	 */
-	public static final String EVENT_NAME = "inputchange";
+	public static final String EVENT_NAME = "inputchange change";
 
 	/**
 	 * Constructor.