]> source.dussan.org Git - vaadin-framework.git/commitdiff
Add FileDownloader.setFileDownloadResource (#10203) 31/331/1
authorLeif Åstrand <leif@vaadin.com>
Thu, 22 Nov 2012 09:52:31 +0000 (11:52 +0200)
committerLeif Åstrand <leif@vaadin.com>
Thu, 22 Nov 2012 09:52:40 +0000 (11:52 +0200)
Change-Id: I1dfcf01af6b4b4a9fa30699dc96dfdb2826b23a8

server/src/com/vaadin/server/FileDownloader.java

index a5f450c28b24f43e15dd21803076f9104e0fcf86..1df197bada2f68ad15174606ebb7323c14bb5d6a 100644 (file)
@@ -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
      * <code>application/octet-stream</code> to reduce the risk of a browser