From a985dcfa40677c6bf0ab654094f32b4a0e0a225d Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Tue, 25 Sep 2012 14:00:37 +0300 Subject: [PATCH] Widgets primary stylename is now set if the component state has defined one #9724 --- .../vaadin/client/ui/AbstractComponentConnector.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 -- 2.39.5