Hi,
I’m new to Vaadin and trying the example from the following URL:
https://
vaadin.com/book/vaadin7/-/page/components.menubar.html
Unfortunately I can’t get it working!
MenuBar.MenuItem project = menubar.addItem("Project", null, mycommand);
[/code]The line above yields an error message: [b]
mycommand cannot be resolved to a variable
[/b], but why!?
mycommand is defined like this:
[code]
final Label selection = new Label("-");
layout.addComponent(selection);
MenuBar.Command mycommand = new MenuBar.Command() {
public void menuSelected(MenuBar.MenuItem selectedItem) {
selection.setValue("Ordered a " +
selectedItem.getText() +
" from menu.");
}
};
Something very basic must be wrong here, but can’t figure out what!
Regards,
Gerard