P0ulBogd
P0ulBogd

Reputation: 77

How i can open vaadin menu bar

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

Answers (1)

raffael
raffael

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

Related Questions