From: Jonatan Kronqvist Date: Fri, 20 Sep 2013 12:32:12 +0000 (+0300) Subject: Don't try to cast a connector to Widget. Fixes #12619 X-Git-Tag: 7.1.7~31 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c7aaa0413f63d938791e760b23fb3f609f285aa0;p=vaadin-framework.git Don't try to cast a connector to Widget. Fixes #12619 Change-Id: I0fe98ca90ed3969f1af1be60668b4c1c561675eb --- diff --git a/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java b/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java index e9061114aa..c3f56b410d 100644 --- a/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java +++ b/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java @@ -32,7 +32,7 @@ final public class VTargetInSubtree extends VAcceptCriterion { protected boolean accept(VDragEvent drag, UIDL configuration) { VTree tree = (VTree) VDragAndDropManager.get().getCurrentDropHandler() - .getConnector(); + .getConnector().getWidget(); TreeNode treeNode = tree.getNodeByKey((String) drag.getDropDetails() .get("itemIdOver")); if (treeNode != null) { @@ -53,4 +53,4 @@ final public class VTargetInSubtree extends VAcceptCriterion { return false; } -} \ No newline at end of file +} diff --git a/uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html b/uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html new file mode 100644 index 0000000000..844636cb02 --- /dev/null +++ b/uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html @@ -0,0 +1,51 @@ + + + + + + + DnDOnSubtree + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.dd.DDTest8?restartApplication
dragvaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[3]11,8
dropvaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[6]34,9
mouseClick + vaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[5]/expand + 10,8
assertElementPresent + vaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[5]/n[0] +
+ +