I just implemented the same thing. What I did was have data in the XML
elements that differentiated what kind of node they were (topic and article
in my case) and that told me the parent topic of the selected node (using
parent topic id of 0 for a top level topic). This way you can compare data
between the dragSource's dragItems and the item that exists in the tree at
the calculatedDropIndex. Through this comparison you'll know if you're
dropping onto a branch or leaf node and can handle it appropriately.

--
Howard Fore, [email protected]
"The universe tends toward maximum irony. Don't push it." - Jeff Atwood


On Mon, Mar 9, 2009 at 3:34 PM, Alan Rother <[email protected]> wrote:

>  Hey All,
> I am trying to build a Flex based tree for our content management system
> here at work. It needs to represent all of the pages on a given site. I
> already have a good working prototype using XML as the dataprovider and i
> have a good chunk of the drag and drop functions working well. The problem I
> am having is around the dragdrop handler. I need to be able to move any page
> to anywhere on the tree, including below (as a child of) any other page in
> addition to being able to reorder pages on the same level (same parent node)
>
> I can get it to do one or the other but not both at the same time. As far
> as I can tell, Flex doesn't recognize the difference between a drop on a
> node and a drop between two nodes. As I think this would solve my problem.
> Has anyone tackled this problem before? I basically need a simple way for my
> very non-technical users to drag pages for one of two operations,
> re-ordering within a section or moving a page to another section.
>
> This ExtJS example is almost exactly what I want my Flex tree to do
>
> http://www.extjs.com/deploy/dev/examples/tree/reorder.html
>
> Except I need to treat every item on the tree as a folder.
>
> =]
>
> --
> Alan Rother
> Adobe Certified Advanced ColdFusion MX 7 Developer
> Manager, Phoenix Cold Fusion User Group, AZCFUG.org
>
>
> 
>

Reply via email to