diff options
author | Artur Signell <artur.signell@itmill.com> | 2009-01-13 07:42:22 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2009-01-13 07:42:22 +0000 |
commit | 3c87eb58afdfac2fa1602bc55b7a070f6a804e1c (patch) | |
tree | 94bac07d0579d50ca32e1d15d61f5451ac1addc9 /src/com/itmill/toolkit/ui/AbstractField.java | |
parent | 359332dd30cd78a5c366e8d93b7c47089538cede (diff) | |
download | vaadin-framework-3c87eb58afdfac2fa1602bc55b7a070f6a804e1c.tar.gz vaadin-framework-3c87eb58afdfac2fa1602bc55b7a070f6a804e1c.zip |
Test case and fix for #2442 - RequiredError not displayed in the tooltip
svn changeset:6509/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui/AbstractField.java')
-rw-r--r-- | src/com/itmill/toolkit/ui/AbstractField.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/com/itmill/toolkit/ui/AbstractField.java b/src/com/itmill/toolkit/ui/AbstractField.java index c1e266a7b8..d245a1329c 100644 --- a/src/com/itmill/toolkit/ui/AbstractField.java +++ b/src/com/itmill/toolkit/ui/AbstractField.java @@ -763,13 +763,14 @@ public abstract class AbstractField extends AbstractComponent implements Field, @Override public ErrorMessage getErrorMessage() { - // Check validation errors only if automatic validation is enabled. - // As an exception, no validation messages are shown for empty - // required fields, as in those cases user is aware of the problem. - // Furthermore, non-required empty fields are obviously correct. + /* + * Check validation errors only if automatic validation is enabled. + * Empty, required fields will generate a validation error containing + * the requiredError string. For these fields the exclamation mark will + * be hidden but the error must still be sent to the client. + */ ErrorMessage validationError = null; - if (isValidationVisible() && !(isEmpty() && isRequired())) { - + if (isValidationVisible()) { try { validate(); } catch (Validator.InvalidValueException e) { |