summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/event/ActionManager.java13
-rw-r--r--server/src/com/vaadin/server/DragAndDropService.java19
2 files changed, 28 insertions, 4 deletions
diff --git a/server/src/com/vaadin/event/ActionManager.java b/server/src/com/vaadin/event/ActionManager.java
index ce3e27d539..8d7a64b364 100644
--- a/server/src/com/vaadin/event/ActionManager.java
+++ b/server/src/com/vaadin/event/ActionManager.java
@@ -15,6 +15,7 @@
*/
package com.vaadin.event;
+import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Map;
@@ -43,11 +44,15 @@ public class ActionManager implements Action.Container, Action.Handler,
private static final long serialVersionUID = 1641868163608066491L;
- /** List of action handlers */
- protected LinkedHashSet<Action> ownActions = null;
+ /**
+ * List of action handlers. Guaranteed to keep the original insertion order.
+ */
+ protected HashSet<Action> ownActions = null;
- /** List of action handlers */
- protected LinkedHashSet<Handler> actionHandlers = null;
+ /**
+ * List of action handlers. Guaranteed to keep the original insertion order.
+ */
+ protected HashSet<Handler> actionHandlers = null;
/** Action mapper */
protected KeyMapper<Action> actionMapper = null;
diff --git a/server/src/com/vaadin/server/DragAndDropService.java b/server/src/com/vaadin/server/DragAndDropService.java
index cc571853fe..df2361e887 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