0 Replies Latest reply on Dec 12, 2008 6:14 AM by GrnEggRules

    Open tree component in expanded state

    GrnEggRules
      I have built a small framework to display demos -- and use an XML-driven tree component to provide access to demo segments and published files.

      I would like the TOC in the Tree component to open in expanded state, but am having no luck with myTree.setIsOpen.

      The tree connects to the XML OK -- I can expand/collapse, etc... and it all looks great. But I cannlt get the tree to open expanded.

      The code I'm trying to open the TOC expanded:

      this.demoTOC.setIsOpen(this.demoTOC.getTreeNodeAt(0), true);

      OR

      this.demoTOC.setIsOpen(this.demoTOC.getTreeNodeAt(0).getTreeNodeAt(0), true);

      The XML that's connected to the tree:

      <?xml version="1.0" encoding="UTF-8"?>

      <toc>
      <demosection label="MY TITLE" >
      <demo ID="00demo.flv" label="title01" isBranch="true" />
      <demo ID="01demo.flv" label="title02" isBranch="true" />
      <demo ID="02demo.flv" label="title03" isBranch="true" />
      <demo ID="03demo.flv" label="title04" isBranch="true" />
      </demosection>
      </toc>

      If anyone can point out what I'm doing wrong, I am ready to learn.

      Thx.