summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/AbstractField.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-09-24 17:56:36 +0300
committerVaadin Code Review <review@vaadin.com>2014-09-26 12:40:14 +0000
commit99b1c1a7936f250885e647983d7e30fd3a7f1018 (patch)
tree51141abb0ed9c1dbca20b31702ab014a559a377e /server/src/com/vaadin/ui/AbstractField.java
parentd516791e28e861893fb5082472a1c0ca59f0dfd7 (diff)
downloadvaadin-framework-99b1c1a7936f250885e647983d7e30fd3a7f1018.tar.gz
vaadin-framework-99b1c1a7936f250885e647983d7e30fd3a7f1018.zip
Add clear() for fields and field group (#14755)
Change-Id: If9372ccceeaacd0826f8b1ed07f64af12bf47fc6
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractField.java')
-rw-r--r--server/src/com/vaadin/ui/AbstractField.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/AbstractField.java b/server/src/com/vaadin/ui/AbstractField.java
index bb70c0c57b..369ad1253c 100644
--- a/server/src/com/vaadin/ui/AbstractField.java
+++ b/server/src/com/vaadin/ui/AbstractField.java
@@ -1513,6 +1513,19 @@ public abstract class AbstractField<T> extends AbstractComponent implements
}
/**
+ * Clear the value of the field.
+ * <p>
+ * The field value is typically reset to the initial value of the field but
+ * this is not mandatory. Calling {@link #isEmpty()} on a cleared field must
+ * always returns true.
+ *
+ * @since
+ */
+ public void clear() {
+ setValue(null);
+ }
+
+ /**
* Is automatic, visible validation enabled?
*
* If automatic validation is enabled, any validators connected to this