diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2016-10-27 16:13:44 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-11-01 10:26:33 +0000 |
commit | 48c249a13ecca8c4c8bd68814850e5e3cdd37d81 (patch) | |
tree | b1f066b2bdd48b09b38b27bd677abba1b0d5d5fc /compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java | |
parent | 92d697b9886896f1dad41026ba3519563838f93e (diff) | |
download | vaadin-framework-48c249a13ecca8c4c8bd68814850e5e3cdd37d81.tar.gz vaadin-framework-48c249a13ecca8c4c8bd68814850e5e3cdd37d81.zip |
Replace setRequired & HasRequired with setRequiredIndicator
Vaadin 7 compatiblity fields still use setRequired via AbstractField (legacy).
Public setRequiredIndicator is added to AbstractField, AbstractMultiSelect and AbstractSingleSelect.
Internally it is still handled on AbstractComponent & -Connector level.
Changes the declarative syntax, required -> required-indicator-visible.
Fixes vaadin/framework8-issue#419
Change-Id: I940dc66944d27584bd78e5452aee627ee3abd03a
Diffstat (limited to 'compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java')
-rw-r--r-- | compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java index eb6255e37a..f8188faa4d 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java @@ -1433,42 +1433,11 @@ public abstract class AbstractField<T> extends AbstractLegacyComponent removePropertyListeners(); } - /** - * Is this field required. Required fields must filled by the user. - * - * If the field is required, it is visually indicated in the user interface. - * Furthermore, setting field to be required implicitly adds "non-empty" - * validator and thus isValid() == false or any isEmpty() fields. In those - * cases validation errors are not painted as it is obvious that the user - * must fill in the required fields. - * - * On the other hand, for the non-required fields isValid() == true if the - * field isEmpty() regardless of any attached validators. - * - * - * @return <code>true</code> if the field is required, otherwise - * <code>false</code>. - */ @Override public boolean isRequired() { return getState(false).required; } - /** - * Sets the field required. Required fields must filled by the user. - * - * If the field is required, it is visually indicated in the user interface. - * Furthermore, setting field to be required implicitly adds "non-empty" - * validator and thus isValid() == false or any isEmpty() fields. In those - * cases validation errors are not painted as it is obvious that the user - * must fill in the required fields. - * - * On the other hand, for the non-required fields isValid() == true if the - * field isEmpty() regardless of any attached validators. - * - * @param required - * Is the field required. - */ @Override public void setRequired(boolean required) { getState().required = required; |