How to open new subwindow from another subwindow in vaadin?

You need a reference to the main window for the application and add a subwindow to that.

Up vote 2 down vote favorite share g+ share fb share tw.

I want to open one subwindow from another subwindow. That is, I m having one popup subwindow in that window I placed one button. If we click that button another popup subwindow should open.

When I am trying this I m getting error that "java.lang. IllegalArgumentException: You can only add windows inside application-level windows. " Can anyone tell me how to solve this in vaadin.

Vaadin link|improve this question asked Mar 10 '10 at 5:17Kumar85082457 39% accept rate.

You need a reference to the main window for the application and add a subwindow to that. YourCurrentSubWindow.getApplication.getMainWindow(). AddWindow(myNewSubWindow); Hope this helps.

In my case I tried the same with a reference I pass to my CustomComponent and tried to add the window from there: refToApplicaiton.getMainWindow(). AddWindow(myNewSubWindow); but I get the same error. Any idea?

– javydreamercsw Oct 24 '11 at 21:55.

Just a small correction to the previous solution: yourCurrentSubWindow.getApplication().getMainWindow(). AddWindow(myNewSubWindow); Those div-bases embedded child windows cannot contain sub-windows, but the main window (and any other top level native window) can.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions