3.0.M2-SNAPSHOT: Tree disappears after drag and drop

UI Components for JSF
Post Reply
callahan
Posts: 768
Joined: 27 May 2010, 22:52

24 May 2011, 19:31

Drag and drop operations can result in a tree disappearing. To reproduce do the following:

1. open page http://www.primefaces.org/showcase-labs ... agDrop.jsf
2. expand all tree nodes
3. drag the topmost node and drop it on the bottommost node
4. Repeat step 3 another two times. After the third drag and drop operation the tree disappears

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

24 May 2011, 21:00

Hehe, I have tested this just now in IE and agree with your. Tree gone away. Issue please? :-)

The drag-&-drop is strange anyway. You can only drop all nodes into just one and no chance to reorder them for the same level.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

24 May 2011, 21:35

DragDrop is experimental feature for tree in milestone 1, please file an issue.

callahan
Posts: 768
Joined: 27 May 2010, 22:52

24 May 2011, 22:04

Here's the issue: http://code.google.com/p/primefaces/iss ... il?id=2078

Will drag and drop in trees remain experimental in 3.0 final?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

24 May 2011, 22:07

Will drag and drop in trees remain experimental in 3.0 final?
Of course not, it is in milestone to receive feedback, it needs bit of work until final.

callahan
Posts: 768
Joined: 27 May 2010, 22:52

24 May 2011, 22:10

Nice to hear :)

Guenter
Posts: 1
Joined: 28 May 2011, 11:31

28 May 2011, 11:53

The issue seems for a drag and drop operation from a node to one of its direct or indirect children removes the whole branch of nodes. Obviously this ends up in a island of nodes not linked to the others anymore. Even if a dragdropListener is implemented, the framework does not call the dragdropListener in this situation, so there is no change to take corrective action.

I noticed the dragdropListener function is called after the framework has rearranged and updated the nodes in the tree. So any corrective actions done by the application within the dragdropListener (e.g. sorting or preventing certain move operations) only show up afterwards.

It would be nice to have the opportunity to reject a certain drag-drop-operation by the dragdropListener (or any other listener called before) and also to arrange the nodes by the application and update the view itself. By this means the application would have more control (e.g. for application level restrictions) and may implement further types of operations (e.g. node copy operations and not only move operations).
PrimeFaces-3.0.M1, Mojarra 2.0.4-b09, Tomcat 7.0.8

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests