Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
11g Release 2 (11.1.2.0.0)

E17491-02

<af:collectionDragSource>

collectionDragSource collection drag source


This tag has been deprecated, instead use the new tag af:dragSource. This tag makes a collection component(for e.g. table, treeTable or tree) a drag source and can be used to declaratively initialize the drag source. The collectionDragSource tag is used in conjunction with either the af:collectionDropTarget or af:dropTarget tags to support drag and drop in collection components.

</section> <section name="Code_Example_s_">

This example makes the table a drag source.


  <af:table var="test1" value="#{collectionDnD.sourceValues}" id="table" 
            summary="collection drag source"
            rowSelection="single">
    <af:column headerText="Product">
      <af:outputText value="#{test1.product}"/>
    </af:column>
    <af:column headerText="Cost">
      <af:outputText value="#{test1.cost}"/>
    </af:column>
    <af:collectionDragSource actions="COPY" modelname="DnDDemoModel"/>
  </af:table>

  <af:table var="test2" value="#{collectionDnD.targetValues}" id="table2"
            summary="collection drag source"
            rowSelection="single">
    <af:column headerText="Product">
       <af:outputText value="#{test2.product}"/>
    </af:column>
    <af:column headerText="Cost">
      <af:outputText value="#{test2.cost}"/>
    </af:column>
    <af:collectionDropTarget actions="COPY" modelname="DnDDemoModel" 
                            dropListener="#{collectionDnD.handleDrop}"/>
  </af:table>
        

Attributes

Name Type Supports EL? Description
actions String no Drag and drop actions supported by this drag source. The actions must be an NMTOKENS with all caps in any particular order for e.g. (actions="COPY LINK MOVE"). If no actions are specified, the default is "COPY".
defaultAction String no Default drag and drop action supported by this drag source. Possible actions are "COPY", "MOVE" or "LINK".
modelName String no The model name for this drag source. The model name is used to identify this drag source. Please note that drag and drop can only be performed between compatible collection components. The model name is used for the compatibility purpose. The modelName attribute of the collectionDragSource must match the modelName attribute of the collectionDropTarget or the discrimant attribute of af:dataFlavor.
dragDropEndListener javax.faces.el.MethodBinding Only EL A method reference to an event of the signature void(DropEvent)that is invoked after the drag drop operation ends. Use this method to clean up/remove rows in case of a move operation.