Reputation: 77
I have standart vaadin example:
MenuBar settings = new MenuBar();
MenuItem settingsMenu = settings.addItem("",
null);
settingsMenu.setIcon(new ThemeResource("loupe.ico"));
settingsMenu.setStyleName("icon-cog");
settingsMenu.addItem("Settings", cmd);
settingsMenu.addItem("Preferences", cmd);
settingsMenu.addSeparator();
settingsMenu.addItem("My Account", cmd);
How i can programmatically open menu or select one of his points.
Upvotes: 1
Views: 1024
Reputation: 2456
As far a I know you can not. Opening and closing a menu does not communicate with the server (tried in debug mode), so the state of the menu is not known to the server and can't be changed. I also checked the sources and could not find any sign that it should be possible somehow (see VMenuBar.java and MenuBarConnector.java).
Upvotes: 1