You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by lucast <lu...@hotmail.com> on 2011/03/04 19:52:44 UTC

Drag and Drop, simply copy from list A to list B

Apologies for the duplicate posting. It seems when I posted the previous one
I wasn't subscribed to mailing list.

I would like to drag an item from list A into list B but instead of removing
the item from list A, I would like to create a copy of the dragged item into
list B.

Also, If I drag item from List B and drop it back into List A, I'd like to
remove the item from list B.

I thought using YuiDDListView and YuiDDTarget would have been enough since
there has been 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-td1881857.html
lengthy debates  in the past and the conclusion was that YUI drag and drop
was best. But it isn't in this case since when dragging item from list A to
list B, it adds the item to list B but it removes it from list A. Unless
there is a work around, which would help.

I noticed that the very same question has been 
http://apache-wicket.1842946.n4.nabble.com/Failing-to-remove-item-from-list-when-drag-and-dropping-td1960968.html
asked before  and the suggestion was to use wicket-dnd.

Is this still the case? is wicket-dnd still the best solution for this
particular requirement?

Effectively, the behaviour that I'm trying to reproduce is:

          
to drag an item from a list into a grid. That should not remove the item
from list and it should add item to grid slot.
          
to move items from one grid slot to another.
          
to remove an item from grid by dragging it from grid slot and dropping it in
list.

Is wicket-dnd still the best for copying item from list instead of removing
it as it happens with YUI drag and drop?

Thanks in advance,

Lucas


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Drag-and-Drop-simply-copy-from-list-A-to-list-B-tp3335780p3335780.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Drag and Drop, simply copy from list A to list B

Posted by lucast <lu...@hotmail.com>.
Hi Bruno,
Sorry. I should correct myself. I have used wicket-dnd, I took no part in
developing this amazing drag and drop functionality. But I am finding it
extremely useful in my pet project.
I have implemented a very small and simple example about what I asked above
(code attached). 
I particularly like the different effects on drag n drop items for windows
theme, human theme and web theme.

One thing to note, is that there was a little bug with wicket-dnd 0.4.1 and
Sven Meier, wicket-dnd creator, very kindly fixed it the day I reported it
(see my other 
http://apache-wicket.1842946.n4.nabble.com/Wicket-dnd-unable-to-use-with-RepeatingViews-td3347961.html
post ). He suggested to use wicket-dnd 0.4.snapshot.

http://apache-wicket.1842946.n4.nabble.com/file/n3384051/HomePage.java
HomePage.java 
http://apache-wicket.1842946.n4.nabble.com/file/n3384051/HomePage.html
HomePage.html 
http://apache-wicket.1842946.n4.nabble.com/file/n3384051/style.css style.css 

Cheers,
Lucas



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Drag-and-Drop-simply-copy-from-list-A-to-list-B-tp3335780p3384051.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Drag and Drop, simply copy from list A to list B

Posted by Bruno Borges <br...@gmail.com>.
You can submit that component to wicketstuff.

www.wicketstuff.org

Congratulations for the great work!


Bruno Borges
www.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
 - Francois de La Rochefoucauld



On Wed, Mar 16, 2011 at 5:51 PM, lucast <lu...@hotmail.com> wrote:

> For the requirements described above I have implemented wicket-dnd and I
> have
> to say it works like a charm.
> In case anyone finds themselves in a similar predicament any time soon, I
> thought I put it out there.
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Drag-and-Drop-simply-copy-from-list-A-to-list-B-tp3335780p3382994.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Drag and Drop, simply copy from list A to list B

Posted by lucast <lu...@hotmail.com>.
For the requirements described above I have implemented wicket-dnd and I have
to say it works like a charm.
In case anyone finds themselves in a similar predicament any time soon, I
thought I put it out there.


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Drag-and-Drop-simply-copy-from-list-A-to-list-B-tp3335780p3382994.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org