I think it should be not much hard to just reconstruct the tree model taking into consideration dragValue and dropValue. E.g. that values is keys of the nodes. So you just need to re-build the model starting from their parent adding dropped node before dragged one. So the positions should be changed.
Thanks Ilya for your time & support.
But, I can't do that, because, if a user drops leaf node on other leaf node, the the destination node(leaf) should become the parent node of the source node. So, I think it doesn't work for me. If, there is any other solution, like I can drop leaf between two leafs, then it will be great. (Or any other solution, regarding my problem, will be great).
ic... actually you can't drop between nodes out-of-the-box. And there is no object in model for that to fill drop value even if possible..
The thing I think worth to try is to create Node markup with two drop zones like
<node> <outputpanel id="upperPanel" layout="block"> ... <outputPanel id="contentPanel" layout="block"> ... <node>
Turn off defaul drop handling at node
add drop supports to those panels
customize indicators to became different for that zones
the first panel should have drop support inside which will place dropped leaf before that node in listener
the second - content panel which hadle the drop by making the dropped node the child leaf.
Hi ya gents
How did this go for you Jsf geeks, this is exactly what im working on at the moment.
Single tree though.
I was just wondering if you had any more tips on dragging and dropping between nodes since your last post