diff options
author | Denis Anisimov <denis@vaadin.com> | 2014-10-05 14:48:49 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-10-07 12:52:28 +0000 |
commit | 09d79b181f3fc9991e9009a2d8580947ab8b0b61 (patch) | |
tree | c6ce2e8e91819ebb8b135a0a54df3ee06100c63d /client | |
parent | e20a1594dd347f562145fea6a8645123c86fa3ec (diff) | |
download | vaadin-framework-09d79b181f3fc9991e9009a2d8580947ab8b0b61.tar.gz vaadin-framework-09d79b181f3fc9991e9009a2d8580947ab8b0b61.zip |
Add ".v-required" style for required component (#10201).
Change-Id: I889587234acdb79e33e625f993c1918befa6aae3
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ApplicationConnection.java | 2 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/AbstractFieldConnector.java | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java index 3e3ad033a7..d182706780 100644 --- a/client/src/com/vaadin/client/ApplicationConnection.java +++ b/client/src/com/vaadin/client/ApplicationConnection.java @@ -141,6 +141,8 @@ public class ApplicationConnection implements HasHandlers { public static final String DISABLED_CLASSNAME = "v-disabled"; + public static final String REQUIRED_CLASSNAME = "v-required"; + public static final String REQUIRED_CLASSNAME_EXT = "-required"; public static final String ERROR_CLASSNAME_EXT = "-error"; diff --git a/client/src/com/vaadin/client/ui/AbstractFieldConnector.java b/client/src/com/vaadin/client/ui/AbstractFieldConnector.java index a3c3779eb6..965e79b6fd 100644 --- a/client/src/com/vaadin/client/ui/AbstractFieldConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractFieldConnector.java @@ -57,5 +57,8 @@ public abstract class AbstractFieldConnector extends AbstractComponentConnector // add / remove error style name to Fields setWidgetStyleNameWithPrefix(getWidget().getStylePrimaryName(), ApplicationConnection.REQUIRED_CLASSNAME_EXT, isRequired()); + + getWidget().setStyleName(ApplicationConnection.REQUIRED_CLASSNAME, + isRequired()); } } |