[
https://jira.jboss.org/jira/browse/RF-2516?page=com.atlassian.jira.plugin...
]
Jeremy Nix commented on RF-2516:
--------------------------------
I'm currently running into the same situation. Code listed below. I managed to work
around the issue by setting an index on the context menu to randomly high number. I'm
using the latest release of Richfaces, 3.3.2.SR1. Here's my code.
<rich:tree id="workplaceTree"
nodeSelectListener="#{workplaceTreeBean.processSelection}"
dragIndicator=":treeDragIndicator" dragType="workplaceNode"
dragValue="workplace"
ajaxSubmitSelection="true"
acceptedTypes="workplaceNode,conceptNode"
dropListener="#{workplaceTreeBean.processDrop}"
value="#{workplaceTreeBean.data}"
var="wkItem">
<rich:treeNode id="wkNode">
<h:outputText value="#{wkItem.folderType.name}" />
<rich:contextMenu id="wkContextMenu" event="oncontextmenu"
attached="true" submitMode="ajax" style="z-index:9999">
<h:outputText value="#{wkItem.folderType.name}" />
<rich:menuItem value="#{wkItem.folderType.name}" disabled="true"
/>
<rich:menuSeparator />
<rich:menuItem value="Add Folder"
actionListener="#{workplaceTreeBean.processContextMenuEvent}"
rendered="#{!item.leaf}"
reRender="createWorkplaceItemDialog_panel"
oncomplete="#{rich:component('createWorkplaceItemDialog')}.show(event);">
</rich:menuItem>
<rich:menuItem value="Rename"
actionListener="#{workplaceTreeBean.processContextMenuEvent}"
rendered="#{!empty wkItem.folderType.parentIndex}"
reRender="renameWorkplaceItemDialog_panel"
oncomplete="#{rich:component('renameWorkplaceItemDialog')}.show(event);">
</rich:menuItem>
<rich:menuItem value="Remove" limitToList="true"
actionListener="#{workplaceTreeBean.removeSelectedChild}"
rendered="#{!empty wkItem.folderType.parentIndex}"
reRender="workplaceTree">
</rich:menuItem>
</rich:contextMenu>
</rich:treeNode>
</rich:tree>
Drag-n-Drop Tree with Context Menu
----------------------------------
Key: RF-2516
URL:
https://jira.jboss.org/jira/browse/RF-2516
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: planning_all
Affects Versions: 3.1.4, 3.2.0
Reporter: Ralf Loechte
Assignee: Alexander Dubovsky
Fix For: 3.3.0
Original Estimate: 6 hours
Remaining Estimate: 6 hours
I have a rich:tree with drag-n-drop support and an attached rich:contextMenu to the
nestet rich:treeNode. if you click right on a node, the contextMenu will open. After click
on the menuItem the cursor changes to the dragIndicator Icon and you drag/drop the
element.
The correct behavior should be that nothing happens in terms of drag-n-drop after click
on a contextMenu in a tree.
<rich:tree
switchType="client" value="#{hierarchyMainBean.data}"
var="item"
nodeFace="#{item.type}"
binding="#{hierarchyMainBean.tree}"
ajaxSubmitSelection="false" preserveModel="state"
immediate="false"
acceptedTypes="member" dragIndicator="treeIndicator"
dragValue="#{item}"
dropListener="#{hierarchyMainBean.processDropTree}">
<rich:treeNode
type="member"
dragType="member"
dragValue="#{item}"
acceptedTypes="member">
<h:outputText value="#{item.name}" />
<rich:dndParam name="label" type="drag"
value="#{item.name}" />
<rich:contextMenu event="oncontextmenu"
attached="true"
submitMode="ajax">
<rich:menuItem value="cut" limitToList="true"
actionListener="#{hierarchyMainBean.processCutElement}">
</rich:menuItem>
</rich:contextMenu>
</rich:treeNode>
</rich:tree>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira