Sub window doesn't close..

Hi All,

I have a weird problem in a sub window of my application, where I have some products to be exported to excel according to a pre-defined template. Following is the scenario.

I have a custom window class (which is a sub class of com.vaadin.ui.Window) which has a table, an OK & a Cancel button in it. The OK button logic is written where that it first removes this window getApplication().getMainWindow().removeWindow(TemplateSelectionWindow.this); and then executes the exporting to excel logic.

However, when I select a row (a template) from the table & click on OK button, the sub window doesn’t close.
But if I click on the Cancel button, it’ll close the window. Also if I don’t select a row (a template) & click on OK, it will still close the window.

The strange part is that when a template is selected, the code still goes through getApplication().getMainWindow().removeWindow(TemplateSelectionWindow.this); and does nothing. Also I checked the item select event in the table & there also nothing suspicious.

Are there any known issues in vaadin as such…?

Any help is greatly appreciated.

Thanks in advance.
Cheers,
Asela.

PS : This custom window class and all it’s components are set to setImmediate(true) .

This sounds very strange; the Window removal shouldn’t have anything to do with whatever else your code is doing. Can you provide a simple test case for this? Are you absolutely sure no exceptions are thrown, or that your window isn’t re-added?

Could your ‘exporting’ behaviour be taking so long as to be blocking the request/response cycle? The client wont update until the response comes back…