diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-01-09 13:27:15 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-01-09 13:27:15 +0000 |
commit | f189b74a6a96dccc76ae37667a2790f530c462f3 (patch) | |
tree | b74c4727f0701bf8daff40bbcba88c9a3f89d8dc | |
parent | 9624d0a1540d790ea2889af9ba5f5a39ee2713d8 (diff) | |
parent | 3c0ade1825e580d370d31e8748423d6beb0fa0f3 (diff) | |
download | vaadin-framework-f189b74a6a96dccc76ae37667a2790f530c462f3.tar.gz vaadin-framework-f189b74a6a96dccc76ae37667a2790f530c462f3.zip |
Merge "Merge of (#10072) to Vaadin 7."
-rw-r--r-- | server/src/com/vaadin/ui/DragAndDropWrapper.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/src/com/vaadin/ui/DragAndDropWrapper.java b/server/src/com/vaadin/ui/DragAndDropWrapper.java index 5ec8fd5c76..23641f285e 100644 --- a/server/src/com/vaadin/ui/DragAndDropWrapper.java +++ b/server/src/com/vaadin/ui/DragAndDropWrapper.java @@ -228,7 +228,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, String id = entry.getKey(); Html5File html5File = entry.getValue(); if (html5File.getStreamVariable() != null) { - target.addVariable(this, "rec-" + id, new ProxyReceiver( + target.addVariable(this, "rec-" + id, new ProxyReceiver(id, html5File)); // these are cleaned from receivers once the upload has // started @@ -278,9 +278,11 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, final class ProxyReceiver implements StreamVariable { + private String id; private Html5File file; - public ProxyReceiver(Html5File file) { + public ProxyReceiver(String id, Html5File file) { + this.id = id; this.file = file; } @@ -313,7 +315,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, new ReceivingEventWrapper(event)); } // no need tell to the client about this receiver on next paint - receivers.remove(file); + receivers.remove(id); // let the terminal GC the streamvariable and not to accept other // file uploads to this variable event.disposeStreamVariable(); |