I have a curious problem dynamically creating a tool bar with all the associated menus...
// this works - the DropDownMenu is added to the ToolBarGroup which is in its turn added to the ToolBar
.... leftToolBarGroup = new HtmlToolBarGroup(); if (type.equals("dropdown")) { HtmlDropDownMenu drop = new HtmlDropDownMenu(); drop.setValue("menu1"); leftToolBarGroup.getChildren().add(drop); } ....
leftToolBarGroup = new HtmlToolBarGroup(); if (type.equals("dropdown")) { addMenuTypeDrop(menu, leftToolBarGroup ) } private void addMenuTypeDrop(Menu menu, UIComponentBase parent) { UIDropDownMenu drop = (UIDropDownMenu) AppUtils.getCurrentApplication().createComponent(UIDropDownMenu.COMPONENT_TYPE); menu.setValue("menu2"); parent.getChildren().add(drop); }