aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/Form.java
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2011-11-12 12:18:27 +0200
committerHenri Sara <hesara@vaadin.com>2011-11-12 12:18:27 +0200
commit75924e5597b7c70f15cbe59e73cb250150df53cb (patch)
tree19d35950eca09df4fc51e6dc982c8291741ec6c2 /src/com/vaadin/ui/Form.java
parentfe78bbbf534bc67c50ddb8483f568195ea29b645 (diff)
downloadvaadin-framework-75924e5597b7c70f15cbe59e73cb250150df53cb.tar.gz
vaadin-framework-75924e5597b7c70f15cbe59e73cb250150df53cb.zip
#7930 Eliminate Validator.isValid()
Eliminate the redundant method Validator.isValid(). Validator.validate() does the same but throws an exception including the validation error message. Migration: - replace implementations of isValid() with internalIsValid() in custom subclasses of AbstractValidator - use Validator.validate() and catch exceptions rather than call Validator.isValid() - note that AbstractField still provides an isValid() method that is internally based on validate()
Diffstat (limited to 'src/com/vaadin/ui/Form.java')
-rw-r--r--src/com/vaadin/ui/Form.java16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/com/vaadin/ui/Form.java b/src/com/vaadin/ui/Form.java
index b7ba23aee3..d7d762fcb9 100644
--- a/src/com/vaadin/ui/Form.java
+++ b/src/com/vaadin/ui/Form.java
@@ -968,21 +968,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
}
/**
- * Tests the current value of the object against all registered validators
- *
- * @see com.vaadin.data.Validatable#isValid()
- */
- @Override
- public boolean isValid() {
- boolean valid = true;
- for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) {
- valid &= (fields.get(i.next())).isValid();
- }
- return valid && super.isValid();
- }
-
- /**
- * Checks the validity of the validatable.
+ * Checks the validity of the Form and all of its fields.
*
* @see com.vaadin.data.Validatable#validate()
*/