DropTarget

net.sf.tacos.components.dojo.DropTarget

Description

Provides Drag and Drop support

Parameters

nametyperequireddefault valuedescription
dragSourceElementjava.lang.StringIf specified, used to add draggable sources by iterating over the child nodes of the specified source element. If dragSourceClass or dragSourceTag aren't specified for selecting child nodes then div tag type is used by default. It is very important to specify an "id" attribute on these nodes, otherwise the drag target won't have any way to identify them when trying to invoke the dragSourceAction. (If that's important for your purposes.)
dragSourceobjectObject,String[],Collection of component/element ids (the rendered html must contain an id= attribute for them to be collected properly) to make draggable into this drop target area.
listenerorg.apache.tapestry.IActionListenerSpecifies an object that is notified when a draggable source is dropped into this dropTarget, which is typically a listener method of its container If a node iterated via dragSourceElement does not have an id attribute it won't be added as a draggable source. The id of the dropped draggable source can be retrieved from the request cycle as a parameter whose name is the value of the constant DRAG_SOURCE_PARAMETER of the class net.sf.tacos.components.dojo.DropTarget.
dragSourceTagjava.lang.StringUsed in conjunction with dragSourceElement to select all child nodes that have a tag type matching dragSourceTag.
onDropjava.lang.StringPass a reference to a javascript function, so that it gets called whenever a drop event happens for the dnd target. That drop event will be passed to the function as a parameter.
acceptedTypesjava.util.Collection{'*'}Defines the html element tag types that this drop target accepts when dragged into it. The default is '*', which accepts any elements. To be able to interact with multiple drop targets on a page it may be neccesary to filter the allowed list to something like 'li', 'div' to prevent some targets.
insertDragSourcebooleanognl:trueSpecifies whether or not to allow the dragged source html elements to be inserted into the DropTarget.

Allow body: ( rendered )

Allow informal parameters:

Reserved parameters: -