summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-09-25 14:00:37 +0300
committerJohn Ahlroos <john@vaadin.com>2012-09-25 14:00:37 +0300
commita985dcfa40677c6bf0ab654094f32b4a0e0a225d (patch)
tree7203e281e371252354ae12080d5e6130f4552267 /client
parent45cdaee31f3dcbe54d85d0c07b89fde1f212439b (diff)
downloadvaadin-framework-a985dcfa40677c6bf0ab654094f32b4a0e0a225d.tar.gz
vaadin-framework-a985dcfa40677c6bf0ab654094f32b4a0e0a225d.zip
Widgets primary stylename is now set if the component state has defined
one #9724
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/AbstractComponentConnector.java10
1 files 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