Hi - I am considering using this download wrapper component but all the examples seem so “static”. In my case the name of the StreamResource and the content it provides would need to be computed from the current application state (to be more precise: the object (and hence its name and content) depend on a selection in another GUI component).
How can I provide a FileDownloadWrapper that creates a new StreamResource only when the button got clicked (and not when creating the component - because at component creation time I know neither the name nor the content that will be downloaded)?
Maybe check out https://vaadin.com/directory/component/lazy-download-button/overview instead?
Great! This is what I’m looking for!
Best regards.