vaadin opening new Window on click of menu item

I m using menu items which are given in vaadin menu demo example ,on click of each menu item i m showing notification message, but my requrement is i have to open new class on click of submenu item some one give me demo example in vaadin how open new window on click of menu item which contain tree ,tabs and other UI objects

You need to separate your main layout into two parts; the first contains the menu, the second contains the actual content (often referred to as ‘views’ in Vaadin). When a user selects an item, the event handler of the menu should instruct the main layout to replace the old content with the new content, with e.g. the replaceComponent() method.

There are many implementations for this out on the 'net, since many Vaadin applications use this pattern. You should be able to adapt one of these for your case.

Good luck! :slight_smile:

Thanks-_- dude ,But i need some clarification if we use replace component it means that it make old window is completely destroyed ,that mean we are not making it hiding in back end , can you explain me little clear due to memory issue i m asking this question:mellow:

Programming with Vaadin is like programming with any Java library; if you keep a reference to the old content then it is fully re-usable and stored in-memory. I you don’t need the old content, just remove all references to it and it will be garbage collected.

No need to worry about memory consumption, though… a typical Vaadin application requires between 20 and 100 kBytes of memory per application (plus all your own data).

thanks dude--

hi dude, can you provide me sample of code ,i m developed the Menu item on click of that i m opening navigation window but problem is i m not replacing old window if you provide me sample it is great help for me i need separation of layout and also navigation of window on click of menu item

Hi i m able to add menu using views and separated two layout one is main layout for menu and other is changing on click of menu command i m not getting how to add sub menu item to this views if you provide me example it will be great full for me-_-

Was the sampler example I pointed out for you yesterday in your
other thread
somehow incompatible for what you need? If so, could you elaborate on what kind of sub menu you meant?