I'm using RichFaces 4.2, and I've noticed that when using drag and drop with trees, that if the text of the drag node is long when compared to the text of the drop target, it really doesn't work very well. Just wondering if there is a simple way to widen out the drop target.
Here's the tree code:
<rich:tree value="#{programBean.assigned}"
var="node"
nodeType="#{node.nodeType}"
toggleType="client"
id="assignedTree"
style="width:500px;">
<rich:treeNode type="PROGRAM" width="500px">
<a4j:outputPanel width="500px">
<rich:dropTarget acceptedTypes="testUnit"
render="assignedTree"
execute="assignedTree"
dropListener="#{programBean.moveUnitt}"
dropValue="#{node}"/>
<h:outputText value="#{node.label}" />
</a4j:outputPanel>
</rich:treeNode>
<rich:treeNode type="UNIT">
<a4j:outputPanel>
<rich:dragSource type="testUnit" dragValue="#{node}"/>
<h:outputText value="#{node.label}"/>
</a4j:outputPanel>
</rich:treeNode>
</rich:tree>
Thanks,
Jason
a4j:outputPanel has no width attribute: http://docs.jboss.org/richfaces/latest_4_2_X/vdldoc/a4j/outputPanel.html
Using style="width: 500px;" should however increase the visual size, too. Can't be of more help than that.
Karsten