Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Loading dynamic data via a Link
Hi
I have this scenario where I am loading PDF documents from a database in two steps:
1/ First I query the database to get a listing of the available PDF documents. The result is displayed in a table where each document is represented as a com.vaadin.ui.Link object.
2/ When the user clicks on the link I will load the PDF document (bytes) from the database and open it in a new window.
The trouble I have is that I can not really figure out how I define the link to use an (internal) dynamic resource as described above.
I have no problems getting Link objects to work using ExternalResource.
Thanks
Jan
Hi,
Instead of using an ExternalResource, you would use a StreamResource
See Section 4.5 of the Book Of Vaadin for more detail.
Cheers,
Charles