How to download a Dynamic file on vaadin 14?

How to download a Dynamic file on vaadin 14?

How? I need help too

Found any solution?

Perhaps this is what you are looking for: https://vaadin.com/docs/v14/flow/advanced/tutorial-dynamic-content.html#using-code-streamresource-code

HTH

Marco

Hi Marco,

Thank you for the suggestion

Some of it is usefull. Now I do it with dynamically adding a button with the anchor, click on it server side and removing it.
Only have to figure out how to force a download with a PDF this way now.

Kind regards,

SB

Thanks again Marco,

Thanks to your suggestion I succesfully implemented what I wanted.
Rest wasn’t that hard apparently.

Now I have a A element in the frontend file in which I dynamically change the download link based on the user selection.

Kind regards,

SB