summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-05-25 23:08:50 +0300
committerVaadin Code Review <review@vaadin.com>2016-05-27 07:41:26 +0000
commitc9f7f0f9e03d9aacea6062e3915f1687a72838b6 (patch)
tree12d7b4eb35a8544fe60fc754960ebfbeea60bd2d /server
parent1e7893d743cde357f0ecca41779ebe45762d86ba (diff)
downloadvaadin-framework-c9f7f0f9e03d9aacea6062e3915f1687a72838b6.tar.gz
vaadin-framework-c9f7f0f9e03d9aacea6062e3915f1687a72838b6.zip
Correctly check if validators are present (#11450)
Change-Id: Ibc0173f96a1000e709bd7ee90cccd500fad1a223
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractField.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractField.java b/server/src/main/java/com/vaadin/ui/AbstractField.java
index e69322b1cc..49eb5b050f 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractField.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractField.java
@@ -507,7 +507,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
// Repaint is needed even when the client thinks that it knows the
// new state if validity of the component may change
if (repaintIsNotNeeded
- && (isRequired() || getValidators() != null || getConverter() != null)) {
+ && (isRequired() || hasValidators() || getConverter() != null)) {
repaintIsNotNeeded = false;
}
@@ -885,6 +885,10 @@ public abstract class AbstractField<T> extends AbstractComponent implements
}
}
+ private boolean hasValidators() {
+ return validators != null && !validators.isEmpty();
+ }
+
/**
* Removes the validator from the field.
*