Best Vaadin way to download runtime generated file

Hi, what is the best Vaadin (7.3.8 or newer) way to download runtime generated file ?

Thanks a lot

Giovanni

Hi,

Can someone help?

Thanks

For Vaadin 7+ see eg.
How to achieve “click-button-to-download-file” in vaadin 7

I have similar issues in my projects.

The only way which works for me is:

Page.getCurrent().open(resource, "_blank", false);

It´s deprecated, but Extensions does not really good work when dealing with runtime generated files.

There´s also an MemoryLeak in this open Method you have to workaround with a own StreamResource Implementation.

Simply run a Thread which cleans up your Resource.

Hope this helps

Hi,

thanks for the answers , i will try the suggestions.

Before i used the .open deprecated method, i will try it again.