Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 8. Lists and ItemRenderers > Enable Dragging in a Spark List

recipe 8.10. Enable Dragging in a Spark List

8.10.1. Problem

You want to enable dragging in a Spark List component.

8.10.2. Solution

Create handlers for the mouseDown, dragEnter, and dragDrop events that the List dispatches, and call the DragManager.doDrag() and DragManager.acceptDragDrop() methods to start the dragging operation and accept the dragged item. On the dragDrop event, update the data provider of the List with the new item.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial