Tree initialization from HTML(Default open nodes&#652





  • TITLE 1

    • OPTION 1






function initTree(){

var myTree = dhtmlXTreeFromHTML('listBox');

myTree.openItem('id1');

}

previous Code can open nodes default.
but
  • date is saved in request scope (ex: ${date} ),JSP can't display any date
    code is as follows:
        <div
    class="dhtmlxTree"
    id="news_tree"
    setImagePath="/TestTree2/img/treeSkin/csh_books/"
        >
            

                  
    • Root
                      

                            
                                
      • ${menu.menuName }
                                    

                                          
                                              
        • ${subMenu.subMenuName }

        •                                 
                                      

                                

      •                     
                        

              





    if I remove javascript,this JSP can show node,but close default,
    if it possible open default and date is dynamic?





Hello,


open=“1” attribute is supported only with initialization from tag.


<div id=“treebox” class=“dhtmlxTree” …>








If you use initialization from list, it is necessary to use openItem method.