summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-11-22 11:52:31 +0200
committerLeif Åstrand <leif@vaadin.com>2012-11-22 11:52:40 +0200
commit7fb247173e34e445e13fcec76b30246be8799791 (patch)
treecddfd839024e6e3dcf30fc9e0f4d4eb60182f3fd /server
parentde1450300bcc83eb3f6eddcd39bd77e02b24dfeb (diff)
downloadvaadin-framework-7fb247173e34e445e13fcec76b30246be8799791.tar.gz
vaadin-framework-7fb247173e34e445e13fcec76b30246be8799791.zip
Add FileDownloader.setFileDownloadResource (#10203)
Change-Id: I1dfcf01af6b4b4a9fa30699dc96dfdb2826b23a8
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/FileDownloader.java11
1 files changed, 11 insertions, 0 deletions
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
@@ -80,6 +80,17 @@ public class FileDownloader extends AbstractExtension {
}
/**
+ * 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
* <code>application/octet-stream</code> to reduce the risk of a browser
* plugin choosing to display the resource instead of downloading it. This