ソースを参照

Correctly check if validators are present (#11450)

Change-Id: Ibc0173f96a1000e709bd7ee90cccd500fad1a223
tags/7.7.0.alpha3
Artur Signell 8年前
コミット
c9f7f0f9e0
1個のファイルの変更5行の追加1行の削除
  1. 5
    1
      server/src/main/java/com/vaadin/ui/AbstractField.java

+ 5
- 1
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.
*

読み込み中…
キャンセル
保存