From ac14e9a5525b10b41449f17c366fb7e5de29e16b Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Thu, 25 Jul 2013 15:05:18 +0300 Subject: Move DragAndDropService to VaadinSession (#11409) * ConnectorTracker.getConnector() is now DnDService-aware * Deprecated LCM.getDragAndDropService() is removed * LCM.getConnector() simply delegates to ConnectorTracker.getConnector() Change-Id: I9627d50f7386ead8d92ccbba27b4a558c03076c7 --- server/src/com/vaadin/ui/ConnectorTracker.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'server/src/com/vaadin/ui') diff --git a/server/src/com/vaadin/ui/ConnectorTracker.java b/server/src/com/vaadin/ui/ConnectorTracker.java index d985ffd124..af03dade3a 100644 --- a/server/src/com/vaadin/ui/ConnectorTracker.java +++ b/server/src/com/vaadin/ui/ConnectorTracker.java @@ -35,6 +35,7 @@ import org.json.JSONObject; import com.vaadin.server.AbstractClientConnector; import com.vaadin.server.ClientConnector; +import com.vaadin.server.DragAndDropService; import com.vaadin.server.GlobalResourceHandler; import com.vaadin.server.LegacyCommunicationManager; import com.vaadin.server.StreamVariable; @@ -271,8 +272,16 @@ public class ConnectorTracker implements Serializable { // Ignore connectors that have been unregistered but not yet cleaned up if (unregisteredConnectors.contains(connector)) { return null; + } else if (connector != null) { + return connector; + } else { + DragAndDropService service = uI.getSession() + .getDragAndDropService(); + if (connectorId.equals(service.getConnectorId())) { + return service; + } } - return connector; + return null; } /** -- cgit v1.2.3