Link causing close event

My application uses the com.vaadin.ui.Link class to support file download from the file system, and its pretty much perfect and easy to use (I can’t see a way to set a different file name on the save/open dialog but that’s a task for another day :stuck_out_tongue: )

My problem is that I need to do some additional clear-up when my application closes (my UI component need to unregister from persistent services). I’ve followed the suggestions in the vaddin book to do my clear-up but it seems that when using the Link (and also doing a StreamSource based download) my main window’s close method, and close event listener are triggered casuing my application to return to the login page when it should just do the download!

Presumably this is because a close event of some type is needed to close the save/open dialog, is there a work around so I can still clean up my old applications?

any suggestions would be great.

Try opening the link to a new window instead of the same window as your application (i.e. set the target of your link to “_blank”), then the close event should not fire.