0 Replies Latest reply on Jun 28, 2011 3:24 PM by Schevus Osborne

    Tree renders treeNodes that are not expandable

    Schevus Osborne Newbie

      I have a tree that is mostly rendering fine, but when I get 50 or so nodes in, it renders its children in an odd way with them shifted and without the proper icons or ability to expand. See my screenshot below.

       

      Tree Fail.JPG

      This node should have an icon with a question mark and should be expandable. I have confirmed that the underlying data populating the tree is valid.

       

      If I expand a node at the same horizontal position as a node that has failed, it will also fail, so this has lead me to wonder if perhaps a tree stops functioning correctly after leaving a parent element? I have some overflowing going on, but I stripped everything down to just a tree in a form, both with the same width set that would easily accomodate the tree's full width and I still encountered this problem (though at a different spot in the tree).

       

      Has anyone else ever encountered this? I can't find anything similar online. I am using richfaces 3.3.1.GA. Below is my code for the tree:

       

      {code:xml}

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"

                      xmlns:ui="http://java.sun.com/jsf/facelets"

                      xmlns:s="http://jboss.com/products/seam/taglib"

                      xmlns:f="http://java.sun.com/jsf/core"

                      xmlns:a4j="http://richfaces.org/a4j"

                      xmlns:rich="http://richfaces.org/rich"

                      xmlns:h="http://java.sun.com/jsf/html">

          <h:form id="treeForm">

              <rich:spacer height="10"/>

       

              <rich:tree id="algStructure" value="#{algorithmTree}" var="treeObject"

                         style="font-size: 11px; font-family: Arial, Verdana, sans-serif">

                  <rich:treeNode rendered="#{treeObject.nodeType.equals('algorithm')}" style="font-weight: bold">

                      <h:outputText value="#{treeObject.shortDisplayValue}" title="#{treeObject.fullDisplayValue}"/>

                  </rich:treeNode>

       

                  <rich:treeNode rendered="#{treeObject.nodeType.equals('question')}" icon="/images/question_mark.gif">

                      <h:outputText value="#{treeObject.shortDisplayValue}" title="#{treeObject.fullDisplayValue}" escape="false"/>

                  </rich:treeNode>

       

                  <rich:treeNode rendered="#{treeObject.nodeType.equals('resolution') and treeObject.approved}" iconLeaf="/images/approved.gif">

                      <h:outputText value="#{treeObject.shortDisplayValue}" title="#{treeObject.fullDisplayValue}" escape="false"/>

                  </rich:treeNode>

       

                  <rich:treeNode rendered="#{treeObject.nodeType.equals('resolution') and !treeObject.approved}" iconLeaf="/images/denied.gif">

                      <h:outputText value="#{treeObject.shortDisplayValue}" title="#{treeObject.fullDisplayValue}" escape="false"/>

                  </rich:treeNode>

       

                  <rich:treeNode rendered="#{treeObject.nodeType.equals('response')}" icon="/images/answer.gif" iconLeaf="/images/answer.gif">

                      <h:outputText value="#{treeObject.shortDisplayValue}" title="#{treeObject.fullDisplayValue}"/>

                  </rich:treeNode>

              </rich:tree>

          </h:form>

      </ui:composition>

      {code}