-
1. Re: Change sequence of leaf nodes or drop leaf in between
ilya_shaikovsky Apr 7, 2010 5:49 AM (in response to jsfgeeks)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.
-
2. Re: Change sequence of leaf nodes or drop leaf in between
jsfgeeks Apr 8, 2010 1:57 AM (in response to ilya_shaikovsky)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).
Thanks again,
JSF GEEKS
-
3. Re: Change sequence of leaf nodes or drop leaf in between
ilya_shaikovsky Apr 8, 2010 4:22 AM (in response to jsfgeeks)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.
-
4. Re: Change sequence of leaf nodes or drop leaf in between
harpritt Oct 28, 2010 9:49 AM (in response to jsfgeeks)Hi ya gents
How did this go for you Jsf geeks, this is exactly what im working on at the moment.
Single tree though.
-
5. Re: Change sequence of leaf nodes or drop leaf in between
harpritt Oct 28, 2010 9:52 AM (in response to ilya_shaikovsky)Hi Ilya
I was just wondering if you had any more tips on dragging and dropping between nodes since your last post