Drag & Drop is a very interesting thing, I guess it could be a feature of web2.0. With Sigma Visual builder, you can add this feature without any code.
Before we do something, we need to know two properties, dragKey and dropKeys. A lot of Sigma Visual components have these two properties. Just remember one thing, components with dragKey ABC could only be dragged into those components with dropKeys containing ABC. Take the following table for example
----------------------------
|dragKey|dropKeys|
---------------------------
ComponentA|AA | |
----------------------------
ComponentB| |AA |
----------------------------
ComponentC| |AA:BB |
----------------------------
ComponentD| |CC:BB |
----------------------------
ComponentA can be dragged and dropped into ComponentB and ComponentC, but not into ComponentD. ComponentD accepts components with CC or BB as their dragKey.
[Req Spec]1. Two lists are needed.
2. End user could drag one item from one to another.
[Do It Yourself]1. Drag a
to design area,set its dragKey to "apple"(Click
to select it, type "apple" in
[Component Config Window]->[properties]->[dragKey],and strike [Enter] on keyboard. )
2. Drag another
to design area,set its dropKeys to "apple:pear"(Click
to select it, type "apple:pear" in
[Component Config Window]->[properties]->[dropKeys],and strike [Enter] on keyboard. )
3. Press [run] to see the result. You could drag item from first to second, but can't from second to first list.
[Conclusion]1. dragKey could be any string without colon( : ).
2. dropKeys could be a combination of dragKey splitted by colon( : ).
3. components with dragKey ABC could only be dragged into those components with dropKeys containing ABC.
4. Dragging & dropping could be performed between different type of components, for instant, from list to radiobox.[/list][/list][/list][/list]