Oracle Fusion Middleware Tag Reference for Oracle ADF Faces 11g Release 1 (11.1.1.7.0) E12419-09 |
This tag makes a collection component (e.g. table, treeTable or tree) a drop target and can be used to declaratively initialize the drop target.
This example makes the tree a drop target.
<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>
Name | Type | Supports EL? | Description |
---|---|---|---|
actions | String | no | Drag and drop actions supported by this target. The actions must be an NMTOKENS from the set of "COPY, "MOVE", "LINK" in any particular order e.g. (actions="COPY LINK MOVE"). If no actions are specified, the default is "COPY". |
modelName | String | no | The model name for this drop target. The model name is used to identify this drop target. Please note that drag and drop can only be performed between compatible collection components. The model name is used for the compatibility purpose. |
dropListener | javax.faces.el.MethodBinding | Only EL | A method reference to a callback with the signature oracle.adf.view.rich.dnd.DnDAction method(oracle.adf.view.rich.event.DropEvent dropEvent) called when a drop occurs on the component. This callback should check the DropEvent to determine whether it will accept the drop or not. If the callback accepts the drop, it should perform the drop and return the DnDAction it performed-- DnDAction.COPY , DnDAction.MOVE or DnDAction.LINK , otherwise it should return DnDAction.NONE to indicate that the drop was rejected. The target component is automatically redrawn in response to a successful drop.
Please note that For further information see the |