ASpecifically the creation of the file content can take some time, enough to warrant a progress bar. I also need to have some validation when the button is pressed to confirm everything on the screen is valid and if not to present some kind of notification.
I saw a couple of addons in the Vaadin directory but they both seem to be immediately start the download. I also tried to manually do it by registering the StreamResource and then opening it with JS but that runs into random issues with timing.
Any suggestions on how to do this would be greatly appreciated.
I also looked at addons like FileDownloadWrapper and so on and make them invisible and click them those when ready but that didn’t seem to work either.
Based on Directory discusssions, you finally implemented this with the DynamicFileDownloader in the Viritin add-on. We should probably create an example how to do it In your case, how did you do it finally? More specifically, did you settle on “indeterminate progressbar”, were you able to notify/update the progress bar from the file generation or did you estimate the progress from another thread?