summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/data/fieldgroup/FieldGroup.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/com/vaadin/data/fieldgroup/FieldGroup.java')
-rw-r--r--server/src/com/vaadin/data/fieldgroup/FieldGroup.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java
index e647bdbf6d..2873d07c5d 100644
--- a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java
+++ b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java
@@ -28,6 +28,7 @@ import com.vaadin.data.Item;
import com.vaadin.data.Property;
import com.vaadin.data.Validator.InvalidValueException;
import com.vaadin.data.util.TransactionalPropertyWrapper;
+import com.vaadin.ui.AbstractField;
import com.vaadin.ui.DefaultFieldFactory;
import com.vaadin.ui.Field;
import com.vaadin.ui.Form;
@@ -1095,4 +1096,18 @@ public class FieldGroup implements Serializable {
}
return memberFieldInOrder;
}
+
+ /**
+ * Clears the value of all fields.
+ *
+ * @since
+ */
+ public void clear() {
+ for (Field<?> f : getFields()) {
+ if (f instanceof AbstractField) {
+ ((AbstractField) f).clear();
+ }
+ }
+
+ }
}