View Full Version : TreePanel TreeViewDragDrop plugin (source) and nested drop zone panels ( targets)

12 Jun 2013, 5:36 AM
This is a simplified explanation of my situation.

The Situation
I have a treepanel as a drag source which drops into an empty panel containing a drop zone (I'll refer to empty panels with a drop zone as a drop container from now on).
The drop container recreates these drag sources as new panels that either contain
1. a simple grid or
2. a vbox panel with a child grid and child drop container.
The parent and child drop container are two separate definitions of an extended panel.
However, what's happening right now is that the child drop container is being created, but a drop action is triggering the parent notify drop event.

The Question
I'm not sure if this is being caused because I only have a single ddgroup specified for these separate drop containers. However, I had assumed that the notify drop event would be tied to the element ( in this case on a drop container basis). So, I'm not exactly sure what is causing a drop in a child drop container to trigger the notify drop of the parent container.

To make this more relatable, picture the portal example. Except in my case each portlet is another possible dragzone so you can drag additional portlets into each portlet creating nested dropzones within portlets.

Edit #1: It looks like all of my nested containers have been calling the same notify functions from the parent container. Not sure why this happens as each one is created separately with a different reference to attach to.

Edit #2: Currently working around it by setting each panel's drop container in config so I can pull it down on each notify drop. Will lead to a pretty large class definition though.

If I'm not being clear let me know and I can clarify or post code etc.