summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-04-05 10:50:00 +0000
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-04-05 10:50:00 +0000
commitf7feb7b15aae9abb360c799dc7bf873a0d5a68ef (patch)
tree783cacaf5ebf65142395c9eb45c2cffba28ddbc8
parent2a88c95e39bdca3e779ff4e9eb44208dfbe3e8d3 (diff)
downloadvaadin-framework-f7feb7b15aae9abb360c799dc7bf873a0d5a68ef.tar.gz
vaadin-framework-f7feb7b15aae9abb360c799dc7bf873a0d5a68ef.zip
Implemented #8307: Added AbstractField#removeAllValidators()
svn changeset:23407/svn branch:6.8
-rw-r--r--src/com/vaadin/ui/AbstractField.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/AbstractField.java b/src/com/vaadin/ui/AbstractField.java
index ac3e14b2b6..f3939de6e1 100644
--- a/src/com/vaadin/ui/AbstractField.java
+++ b/src/com/vaadin/ui/AbstractField.java
@@ -683,6 +683,16 @@ public abstract class AbstractField extends AbstractComponent implements Field,
}
/**
+ * Removes all validators from the field.
+ */
+ public void removeAllValidators() {
+ if (validators != null) {
+ validators.clear();
+ }
+ requestRepaint();
+ }
+
+ /**
* Tests the current value against registered validators if the field is not
* empty. If the field is empty it is considered valid if it is not required
* and invalid otherwise. Validators are never checked for empty fields.