summaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/com/vaadin/server/DragAndDropService.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/server/src/com/vaadin/server/DragAndDropService.java b/server/src/com/vaadin/server/DragAndDropService.java
index 5a54b5ae3a..38c055eb1a 100644
--- a/server/src/com/vaadin/server/DragAndDropService.java
+++ b/server/src/com/vaadin/server/DragAndDropService.java
@@ -64,6 +64,16 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
public void changeVariables(Object source, Map<String, Object> variables) {
Object owner = variables.get("dhowner");
+ final Component sourceComponent = (Component) variables
+ .get("component");
+ if (sourceComponent != null && !sourceComponent.isEnabled()) {
+ // source component not supposed to be enabled
+ getLogger().warning(
+ "Client dropped from " + sourceComponent
+ + " even though it's disabled");
+ return;
+ }
+
// Validate drop handler owner
if (!(owner instanceof DropTarget)) {
getLogger()
@@ -74,6 +84,15 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
// owner cannot be null here
DropTarget dropTarget = (DropTarget) owner;
+
+ if (!dropTarget.isEnabled()) {
+ getLogger()
+ .warning(
+ "Client dropped on " + owner
+ + " even though it's disabled");
+ return;
+ }
+
lastVisitId = (Integer) variables.get("visitId");
// request may be dropRequest or request during drag operation (commonly