Html5 Support for Apache MyFaces
Project Documentation


Tag name: <fx:dragSource>
Converter class: org.apache.myfaces.html5.behavior.DragSourceBehavior
Facelet Tag Handler: org.apache.myfaces.html5.handler.DragSourceBehaviorHandler
behavior id: org.apache.myfaces.html5.DragSourceBehavior
Adds the Html5 drag functionality to its parent.
This behavior should be attached to "dragstart" event of the parent.

Facelets Attributes

Name Type Required Description
action javax.el.ValueExpression false Action of for drag operation. Can be one of below:
  • copy: A copy of the source item may be made at the new location.
  • move: An item may be moved to a new location.
  • link: A link may be established to the source at the new location.
  • none: The item may not be dropped.

If nothing is specified, the action will be defined by the browser and can be adjusted using the modifier keys. If dropTarget does not accept the action of this dragSource, then the DnD will fail.
dropTargetTypes javax.el.ValueExpression false The types of the dropTargets that drags from this dragSource can be applied. Can be comma separated set or String[] or Collection<String>.
If defined, drags from this dragSource will work into only the dropTargets that have one of the same type. The drag will be accepted if 'types' of hx:dropTarget has one of the types defined here.
for String false {@inheritDoc}
param javax.el.ValueExpression false Data to send to server when a successful drag and drop happens from this source.
The param can be received using the {@link DropEvent#getParam()} method at dropListener of the fx:dropTarget.