From: John Ahlroos Date: Tue, 25 Sep 2012 11:00:37 +0000 (+0300) Subject: Widgets primary stylename is now set if the component state has defined X-Git-Tag: 7.0.0.beta6~87^2~13^2~18 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a985dcfa40677c6bf0ab654094f32b4a0e0a225d;p=vaadin-framework.git Widgets primary stylename is now set if the component state has defined one #9724 --- diff --git a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java index c6990d92f1..339bcc9a46 100644 --- a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java @@ -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