From 7fb247173e34e445e13fcec76b30246be8799791 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Thu, 22 Nov 2012 11:52:31 +0200 Subject: [PATCH] Add FileDownloader.setFileDownloadResource (#10203) Change-Id: I1dfcf01af6b4b4a9fa30699dc96dfdb2826b23a8 --- server/src/com/vaadin/server/FileDownloader.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/src/com/vaadin/server/FileDownloader.java b/server/src/com/vaadin/server/FileDownloader.java index a5f450c28b..1df197bada 100644 --- a/server/src/com/vaadin/server/FileDownloader.java +++ b/server/src/com/vaadin/server/FileDownloader.java @@ -79,6 +79,17 @@ public class FileDownloader extends AbstractExtension { return getResource("dl"); } + /** + * Sets the resource that is downloaded when the extended component is + * clicked. + * + * @param resource + * the resource to download + */ + public void setFileDownloadResource(Resource resource) { + setResource("dl", resource); + } + /** * Sets whether the content type of served resources should be overriden to * application/octet-stream to reduce the risk of a browser -- 2.39.5