summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-10-26 10:36:28 +0300
committerVaadin Code Review <review@vaadin.com>2012-10-29 13:44:58 +0000
commit274565fa24b7b04e99b7dec621005d93801f7fbb (patch)
tree477a2cd883ffeb95f12b73a3a54314542b129d04 /client
parent228186fe44245fa46a1614d027c89a276505685e (diff)
downloadvaadin-framework-274565fa24b7b04e99b7dec621005d93801f7fbb.tar.gz
vaadin-framework-274565fa24b7b04e99b7dec621005d93801f7fbb.zip
Fixed missing stylenames on menu item #10077
Change-Id: Iadbfee6d86efef06d549d587e2ac6e2e6b519fb1
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/menubar/VMenuBar.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/ui/menubar/VMenuBar.java b/client/src/com/vaadin/client/ui/menubar/VMenuBar.java
index 38d6d513bf..83b1c58d0a 100644
--- a/client/src/com/vaadin/client/ui/menubar/VMenuBar.java
+++ b/client/src/com/vaadin/client/ui/menubar/VMenuBar.java
@@ -783,6 +783,8 @@ public class VMenuBar extends SimpleFocusablePanel implements
protected boolean selected = false;
protected String description = null;
+ private String styleName;
+
/**
* Default menu item {@link Widget} constructor for GWT.create().
*
@@ -889,6 +891,10 @@ public class VMenuBar extends SimpleFocusablePanel implements
super.setStyleName(primaryStyleName + "-menuitem");
}
+ if (styleName != null) {
+ addStyleDependentName(styleName);
+ }
+
if (enabled) {
removeStyleDependentName("disabled");
} else {
@@ -1003,15 +1009,16 @@ public class VMenuBar extends SimpleFocusablePanel implements
}
if (uidl.hasAttribute(MenuBarConstants.ATTRIBUTE_ITEM_STYLE)) {
- String itemStyle = uidl
+ styleName = uidl
.getStringAttribute(MenuBarConstants.ATTRIBUTE_ITEM_STYLE);
- addStyleDependentName(itemStyle);
}
if (uidl.hasAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION)) {
description = uidl
.getStringAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION);
}
+
+ updateStyleNames();
}
public TooltipInfo getTooltip() {