]> source.dussan.org Git - vaadin-framework.git/commitdiff
Widgets primary stylename is now set if the component state has defined
authorJohn Ahlroos <john@vaadin.com>
Tue, 25 Sep 2012 11:00:37 +0000 (14:00 +0300)
committerJohn Ahlroos <john@vaadin.com>
Tue, 25 Sep 2012 11:00:37 +0000 (14:00 +0300)
one #9724

client/src/com/vaadin/client/ui/AbstractComponentConnector.java

index c6990d92f1179f55279dbd89ca688ed7baa3afad..339bcc9a4611f5a8fc757f4868153c10cdc61c75 100644 (file)
@@ -271,8 +271,14 @@ public abstract class AbstractComponentConnector extends AbstractConnector
     protected void updateWidgetStyleNames() {
         ComponentState state = getState();
 
-        String primaryStyleName = state.primaryStyleName == null ? ""
-                : state.primaryStyleName;
+        String primaryStyleName = getWidget().getStylePrimaryName();
+        if (state.primaryStyleName != null) {
+            /*
+             * We overwrite the widgets primary stylename if state defines a
+             * primary stylename
+             */
+            getWidget().setStylePrimaryName(state.primaryStyleName);
+        }
 
         // should be in AbstractFieldConnector ?
         // add / remove read-only style name