1 Reply Latest reply on May 13, 2012 5:12 AM by kwutzke

    widening drop target with drag and drop tree

    jasoningram

      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