Using the Drag-and-Drop API

Drag and drop is commonly used when a user wants to transfer data from one component to another component. With XUI Framework version 2.3, the drag and drop capability can be applied to the xtable, xtree, and xtabbedpane components. To drag one element from the source component and drop it to the target component, a user needs to apply the supported drag and drop attributes into both the target and source components declaration. The supported drag and drop attributes are the following:

  1. drag-begin
  2. drag-enter
  3. drag-over
  4. drag-exit
  5. drag-drop
  6. drag-complete

In addition to the drag and drop attributes, there is DragDropEvent, a supporting JavaScript objects that will be discussed thoroughly later.

Drag and Drop Modes
Each of the supported attributes reacts on different type of drag and drop events. In overall, these attributes are categorized into two sections, the dragging mode and the dropping mode. For example, during dragging mode, drag-begin and drag-complete attributes are triggered. The drag-enter, drag-over, and drag-drop are triggered during the dropping mode. The dragging related attributes are applied into source component declaration, and the dropping related attributes are applied into target component declaration. The following table describes the categorization of the attributes based on the mode.

Dragging Mode (Source Component) Dropping Mode (Target Component)
drag-begin
drag-exit
drag-complete
drag-enter
drag-over
drag-drop

 

Next: Drag-and-Drop Attributes in Detail
Back to: Application Guide

 

 


COPYRIGHT © 1997–2006 JWAY GROUP, Inc.
All Rights Reserved. XUI is a registered trademark of JWAY GROUP, Inc.

All other designated trademarks and brands are properties of their respective owners.