Explorar el Código

Correctly check if validators are present (#11450)

Change-Id: Ibc0173f96a1000e709bd7ee90cccd500fad1a223
tags/7.7.0.alpha3
Artur Signell hace 8 años
padre
commit
c9f7f0f9e0
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5
    1
      server/src/main/java/com/vaadin/ui/AbstractField.java

+ 5
- 1
server/src/main/java/com/vaadin/ui/AbstractField.java Ver fichero

@@ -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.
*

Cargando…
Cancelar
Guardar