generate dynamic download content every time on button click...

Hello, I want to download dynamically generated excel file every time a user clicks an export button. Now, wether I use an Anchor or FileDownloadWrapper, the method, which generates the StreamResource with my content is only being called once, on Anchor or FileDownloadWrapper creation, I want it to be called every time the attached button is clicked. What am I doing wrong?

How about Flow Viritin - Vaadin Add-on Directory and DynamicFileDownloader ?

looks promising is there some kind of documentation for this project?

There are demos included in the source

Here a direct link: flow-viritin/src/test/java/org/vaadin/firitin/DynamicFileDownloadingDemo.java at v24 · viritin/flow-viritin · GitHub

thanks viritin was exactly what I was looking for!