]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed ClassCastException when MenuBar has a set width
authorArtur Signell <artur@vaadin.com>
Thu, 26 Jan 2012 14:30:54 +0000 (16:30 +0200)
committerArtur Signell <artur@vaadin.com>
Thu, 26 Jan 2012 14:30:54 +0000 (16:30 +0200)
src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
src/com/vaadin/terminal/gwt/client/ui/VMenuBarPaintable.java

index 372ddf25d21cf773dbc63edbc1920ec5d5737857..c39155d032f8f5a76cc5a91d5d28bc57a3e79053 100644 (file)
@@ -1420,8 +1420,4 @@ public class VMenuBar extends SimpleFocusablePanel implements
         return null;
     }
 
-    public Widget getWidgetForPaintable() {
-        return this;
-    }
-
 }
index 38b3cac35850ff4a64a98b3c29ff07edaceaeb8e..f36db99583358c6d644b5a42c7cf7acd095cfcb6 100644 (file)
@@ -9,7 +9,6 @@ import com.google.gwt.user.client.ui.Widget;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;\r
 import com.vaadin.terminal.gwt.client.UIDL;\r
 import com.vaadin.terminal.gwt.client.Util;\r
-import com.vaadin.terminal.gwt.client.VPaintableMap;\r
 import com.vaadin.terminal.gwt.client.ui.VMenuBar.CustomMenuItem;\r
 \r
 public class VMenuBarPaintable extends VAbstractPaintableWidget {\r
@@ -66,12 +65,10 @@ public class VMenuBarPaintable extends VAbstractPaintableWidget {
 \r
             getWidgetForPaintable().moreItem = GWT.create(CustomMenuItem.class);\r
             getWidgetForPaintable().moreItem.setHTML(itemHTML.toString());\r
-            getWidgetForPaintable().moreItem\r
-                    .setCommand(getWidgetForPaintable().emptyCommand);\r
+            getWidgetForPaintable().moreItem.setCommand(VMenuBar.emptyCommand);\r
 \r
             getWidgetForPaintable().collapsedRootItems = new VMenuBar(true,\r
-                    (VMenuBar) VPaintableMap.get(client).getPaintable(\r
-                            getWidgetForPaintable().uidlId));\r
+                    getWidgetForPaintable());\r
             getWidgetForPaintable().moreItem\r
                     .setSubMenu(getWidgetForPaintable().collapsedRootItems);\r
             getWidgetForPaintable().moreItem.addStyleName(VMenuBar.CLASSNAME\r