From 81aadbb9edeb4a57dd02c35937905e5427a674e0 Mon Sep 17 00:00:00 2001 From: maxschuster Date: Mon, 22 Feb 2016 00:10:21 +0100 Subject: Fix DragAndDropWrapper update after file upload (#19616) After a file has been uploaded VDragAndDropWrapper tries to pull changes from the server by calling ApplicationConnection.sendPendingVariableChanges() which has no effect. This change replaces the ApplicationConnection.sendPendingVariableChanges() call with an RPC. Change-Id: Ibdf7f4d702add9507dbe54c1fdb402f0f4b19d19 --- server/src/com/vaadin/ui/DragAndDropWrapper.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'server/src') diff --git a/server/src/com/vaadin/ui/DragAndDropWrapper.java b/server/src/com/vaadin/ui/DragAndDropWrapper.java index 90b3b56ef6..29179ddca7 100644 --- a/server/src/com/vaadin/ui/DragAndDropWrapper.java +++ b/server/src/com/vaadin/ui/DragAndDropWrapper.java @@ -40,6 +40,7 @@ import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.dd.HorizontalDropLocation; import com.vaadin.shared.ui.dd.VerticalDropLocation; import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperConstants; +import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperServerRpc; import com.vaadin.ui.declarative.DesignContext; @SuppressWarnings("serial") @@ -111,6 +112,14 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, } + private final DragAndDropWrapperServerRpc rpc = new DragAndDropWrapperServerRpc() { + + @Override + public void poll() { + // #19616 RPC to poll the server for changes + } + }; + private Map receivers = new HashMap(); public class WrapperTargetDetails extends TargetDetailsImpl { @@ -197,6 +206,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, @Deprecated public DragAndDropWrapper() { super(); + registerRpc(rpc); } /** -- cgit v1.2.3