summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorMatti Tahvonen <matti@vaadin.com>2017-03-22 18:58:15 +0200
committerHenri Sara <henri.sara@gmail.com>2017-03-22 18:58:15 +0200
commitda7b805f1012886541418f4552839ca475f931dc (patch)
tree9efbe1ecd11e07729a5a70e40420be2524791767 /server
parentacbb5a787b8623745aa440b37705e76dfab21d4e (diff)
downloadvaadin-framework-da7b805f1012886541418f4552839ca475f931dc.tar.gz
vaadin-framework-da7b805f1012886541418f4552839ca475f931dc.zip
Improved Binder#hasChanges JavaDoc (#8912)
JavaDoc now more explicitly states that hasChanges is not designed to work with setBean.
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/data/Binder.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/server/src/main/java/com/vaadin/data/Binder.java b/server/src/main/java/com/vaadin/data/Binder.java
index d678bdd321..64f1224754 100644
--- a/server/src/main/java/com/vaadin/data/Binder.java
+++ b/server/src/main/java/com/vaadin/data/Binder.java
@@ -1602,7 +1602,7 @@ public class Binder<BEAN> implements Serializable {
* level validators if a bean is currently set with
* {@link #setBean(Object)}, and returns whether any of the validators
* failed.
- *
+ *
* @return whether this binder is in a valid state
* @throws IllegalStateException
* if bean level validators have been configured and no bean is
@@ -1789,7 +1789,7 @@ public class Binder<BEAN> implements Serializable {
* <p>
* The listener is added to all fields regardless of whether the method is
* invoked before or after field is bound.
- *
+ *
* @see ValueChangeEvent
* @see ValueChangeListener
*
@@ -1933,12 +1933,16 @@ public class Binder<BEAN> implements Serializable {
}
/**
- * Check whether any of the bound fields' values have changed since last
- * explicit call to {@link #setBean(Object)}, {@link #readBean(Object)},
- * {@link #removeBean()}, {@link #writeBean(Object)} or
- * {@link #writeBeanIfValid(Object)}. Unsuccessful write operations will not
- * affect this value. Return values for each case are compiled into the
- * following table:
+ * Check whether any of the bound fields' have uncommitted changes since
+ * last explicit call to {@link #readBean(Object)}, {@link #removeBean()},
+ * {@link #writeBean(Object)} or {@link #writeBeanIfValid(Object)}.
+ * Unsuccessful write operations will not affect this value.
+ * <p>
+ * Note that if you use {@link #setBean(Object)} method, Binder tries to
+ * commit changes as soon as all validators have passed. Thus, when using
+ * this method with it seldom makes sense and almost always returns false.
+ *
+ * Return values for each case are compiled into the following table:
*
* <p>
*