Dear today with the help of examples http://demo.vaadin.com/book-examples-vaadin7/book/
build the menu, most unfortunately what the swing is quiet in vaadin’m picking up ugly, met along the way such a navigator and could not make it work then peopl who can assess what I did (better what I copied) and where I am going wrong .
Note. The menu is being rendered can not call the classes linked to the menu, does not give any error, do not simply nothing.
@Override
protected void init(VaadinRequest request) {
setLocale(new Locale("pt", "BR"));
VerticalLayout layout = new VerticalLayout();
layout.setSizeFull();
setContent(layout);
// Mostrar uma view controlada pelo navigator
Panel viewDisplay = new Panel();
viewDisplay.setSizeFull();
// Criar um navigator
Navigator navigator = new Navigator(this, viewDisplay);
//navigator.addView("beverages", new MyView("Beverages View"));
//navigator.addView("snacks", new MyView("Snacks View"));
//navigator.addView("Serviços", new MyView("Services View"));
navigator.addView("Beverages", new Beverages() );
navigator.addView("Snacks", new Snacks() );
navigator.navigateTo("Beverages");
NavigableMenuBar menu = new NavigableMenuBar(navigator);
menu.addStyleName("mybarmenu");
layout.addComponent(menu);
layout.addComponent(viewDisplay);
layout.setExpandRatio(viewDisplay, 1.0f);
navigator.addViewChangeListener(menu);
menu.addView("Beverages", "Beverages", null);
menu.addView("Snacks", "Snacks", null);
//updateContent();
}
Dear Pedro okay? so I was thinking it would not receive another return, the error that is lacking I insert these two classes this information you provided, I will do as suggested and post the application behavior.