1 Reply Latest reply on Jul 1, 2011 9:37 AM by anyz

    TreeNode expanded attribtue not working

    anyz

      I am using RichFaces 4 Final realease and not able to make my tree expanded by default (on loading page). I followed the thread at http://community.jboss.org/message/601321 and try all the variants of expanded attribute but nothing worked.

       

       

      <rich:tree id="tree" var="node" nodeType="#{node.nodeType}" stateVar="true" keepSaved="true"

                          value="#{myBean.root}" toggleType="ajax"     

       

                        selectionType="ajax"

       

                        render="treePnl , nodeChildsPnl"

       

                        selectionChangeListener="#{myBean.selectionChanged}">

       

       

      <rich:treeNode expanded="true"  type="#{node.nodeType}"  iconLeaf="#{node.nodeIcon}"    iconExpanded="#{node.nodeIcon}"

           iconCollapsed="#{node.nodeIcon}" >

       

       

      I didt try the EL expression as expanded="#{node.expanded}". Here expanded returns true but node is never expanded.

       

      Message was edited by: Anyz

        • 1. Re: TreeNode expanded attribtue not working
          anyz

          I have fixed issue. Actually my toggleType was set to Ajax and i use to populate tree on toggling. So tree is initially not created and thus not expanded. Make the toggleType "client" and loaded the tree on startup and its expanded on startup. Hope it may help someone in same situation.