treeNode selection problem with dragSupport
renegritsch Nov 23, 2010 5:07 AMHi,
as soon as I add the the dragsupport, which works fine btw, my tree node won´t get selected anymore.
Do i something wrong with the events or is this because the onclick event gets overriden by the dragsupport?
Here our example:
{code:xml}
<rich:tree
id="tree"
switchType="ajax"
nodeSelectListener="#{tree.nodeSelect}"
ajaxSubmitSelection="true"
ajaxSingle="true"
adviseNodeSelected="#{treeStateAdvisor.adviseNodeSelected}"
adviseNodeOpened="#{treeStateAdvisor.adviseNodeOpened}"
style="height:#{browser.innerHeight}px">
<rich:recursiveTreeNodesAdaptor roots="#{tree.workspace}" var="item" nodes="#{item.children}">
<rich:treeNode selectedClass="rich-tree-node-selected" ajaxSingle="true" ajaxSubmitSelection="true" onmousedown="return false;" icon="#{resources.image(item.icon)}" iconLeaf="#{resources.image(item.icon)}">
<a4j:support rendered="#{item.enabled and item.hasSingleClick()}" event="onclick" action="#{boController.startConsultation(item.getSingleClickAction())}" immediate="true" ajaxSingle="true" bypassUpdates="true" ignoreDupResponses="true">
<s:conversationPropagation type="none"/>
</a4j:support>
<h:outputText id="listEntryID" value="#{item.name}"/>
<rich:dragSupport rendered="#{item.allowDragAndDrop()}" dragIndicator=":indicator" dragType="#{item.dragAndDropType}" dragValue="#{item}" acceptedTypes="#{item.dragAndDropType}">
<rich:dndParam name="label" value="#{item.name}" />
</rich:dragSupport>
</rich:treeNode></rich:recursiveTreeNodesAdaptor>
</rich:tree>
{code}
-
wrong_with_drag.png 25.2 KB
-
ok_without_drag.jpg 34.4 KB