diff options
author | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2008-10-24 13:12:32 +0000 |
---|---|---|
committer | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2008-10-24 13:12:32 +0000 |
commit | c3a3b846459317f29b443a3d8be33f539d9fa78a (patch) | |
tree | 9c44a00aac40e2c8150797c8e81d6fa89b532019 /src/com/itmill/toolkit/data | |
parent | fa31ca63efd5de25364fc88da4478c7005fbcee5 (diff) | |
download | vaadin-framework-c3a3b846459317f29b443a3d8be33f539d9fa78a.tar.gz vaadin-framework-c3a3b846459317f29b443a3d8be33f539d9fa78a.zip |
Fixes #2179
svn changeset:5715/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/data')
-rw-r--r-- | src/com/itmill/toolkit/data/Validator.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/itmill/toolkit/data/Validator.java b/src/com/itmill/toolkit/data/Validator.java index 7f2de6ca13..3bbd75e3dc 100644 --- a/src/com/itmill/toolkit/data/Validator.java +++ b/src/com/itmill/toolkit/data/Validator.java @@ -95,9 +95,29 @@ public interface Validator { throw new NullPointerException( "Possible causes array must not be null"); } + this.causes = causes; } + /** + * See if the error message doesn't paint anything visible. + * + * @return True iff the paint method does not paint anything visible. + */ + public boolean isInvisible() { + if (getMessage() != null) { + return false; + } + if (causes != null) { + for (int i = 0; i < causes.length; i++) { + if (!causes[i].isInvisible()) { + return false; + } + } + } + return true; + } + public final int getErrorLevel() { return ErrorMessage.ERROR; } |