Oracle Fusion Middleware Tag Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81455-02 |
Makes a component specify a default drag source that this tag would automatically enable.
This example makes the table a drag source.
<af:table var="test1" value="#{collectionDnD.sourceValues}" id="table"
summary="generic 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:dragSource actions="COPY" discriminant="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".
discriminant
String
no
The discriminant for the default DataFlavors generated by this drag source. The
discriminant is used to segregate drags from this drag source. Please note that drag
and drop can only be performed between compatible drag sources and drop targets. The
discriminant is used for the compatibility purpose. The discriminants of the
DataFlavors generated by the default drag source must match the allowed
discriminants on the allowed DataFlavors of the drop target.
dragDropEndListener
javax.el.MethodExpression
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.