This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/master by this push:
new 8b58225 WICKET-6853 OnChangeAjaxBehaviour gets called if there was no
change
8b58225 is described below
commit 8b582257eef9eda1987e67df2fd06a1bb35d5334
Author: Martin Tzvetanov Grigorov <[email protected]>
AuthorDate: Tue Dec 15 15:02:14 2020 +0200
WICKET-6853 OnChangeAjaxBehaviour gets called if there was no change
Improve the javadoc of OnChangeAjaxBehaviour
---
.../org/apache/wicket/ajax/form/OnChangeAjaxBehavior.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
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 a730455..198e336 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
@@ -26,12 +26,16 @@ import org.apache.wicket.util.lang.Args;
import org.danekja.java.util.function.serializable.SerializableConsumer;
/**
- * A behavior that updates the hosting {@link FormComponent} via Ajax when
value of the component is
- * changed.
+ * A behavior that updates the hosting {@link FormComponent}'s model 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.
- * For text input form components it uses event 'input', for other form
component types the 'change'
- * event is used.
+ * For {@link TextField} and {@link TextArea} form components this behavior
uses JavaScript
+ * <em>input</em> and <em>change</em> events, for other form component types
only JavaScript
+ * <em>change</em> event is used.
+ * <br/>
+ * <strong>Note</strong>: JavaScript <em>change</em> event is being fired by
the browser
+ * also when the HTML form element losses the focus, i.e. an Ajax call will be
made even
+ * if there is no actual change of the form element's value!
* </p>
*
* @author Janne Hietamäki (janne)