Can't get openFolder to work

I would like to be able to open a menu tree at a specific folder. All the reading I have done in the docs and here seem to indicate that I can use tree.openFolder to do this. However, I pass it the node in question and nothing happens. openAll() will open the entire tree but that is the only one that seems to work. I have checked in the Developer Console and I am indeed retrieving a node and passing it in. But nothing happens. The tree stays closed. Any ideas here would be appreciated. I am using SC 70RC2.

My code is below

  isc.TreeGrid.create({
    ID:"menuTree",
    autoDraw:false,
    showHeader:false,
    showEdges:false,
    nodeClick: function (v, n, rn) {
      if(n.nodeLink) {
        if(n.newWindow) {
          launchURL_NW(n.nodeLink);
        } else {
          launchURL_CW(n.nodeLink);
        }
      }
    },
    data:isc.Tree.create({
    ID:"mainMenuTree",
    nodeIcon:"/icons/page.gif",
    folderIcon:"/icons/folder.gif",
    showOpenIcons:true,
    showConnectors:true,
    showFullConnectors:true,
    modelType:"children",
    nameProperty:"nodeTitle",
    childrenProperty:"subMenuNodes",
    root: {
      nodeID:"1",
      subMenuNodes:[
        {
          ID:"HomePage",
          nodeID:"5",
          nodeTitle:"NEDU Intranet Home Page",
          nodeLink:"/home.asp",
          subMenuNodes:[
            {
              nodeID:"10",
              nodeTitle:"XO\'s Corner",
              nodeLink:"/xo.asp"
            },
            {
              nodeID:"11",
              nodeTitle:"CMC",
              nodeLink:"/cmc.asp",
              statusLine:"Command Master Chief\'s Page"
            },
            {
               nodeID:"12",
               nodeTitle:"Diver Training",
               nodeLink:"/mdv.asp",
               statusLine:"Command Master Diver\'s Page"
            },
            {
              nodeID:"60",
              nodeTitle:"Watchbills",
              statusLine:"Watchbills SubMenu",
              subMenuNodes:[
                {
                  nodeID:"61",
                  nodeTitle:"Upcoming",
                  nodeLink:"s:/pnma/nedu/nedu intranet/content/mdv/upcoming_watchbill.pdf",
                  newWindow:true,
                  statusLine:"Upcoming (Next Months) Watchbill"
                },
                {
                  nodeID:"62",
                  nodeTitle:"Current",
                  nodeLink:"s:/pnma/nedu/nedu intranet/content/mdv/watchbill.pdf",
                  newWindow:true,
                  statusLine:"Current Watchbill"
                },
                {
                  nodeID:"61",
                  nodeTitle:"Upcoming",
                  nodeLink:"s:/pnma/nedu/nedu intranet/content/mdv/watchbill_old.pdf",
                  newWindow:true,
                  statusLine:"Previous Watchbill"
                }
              ] // close of Watchbills Submenu items
            }, // end of Watchbills menu item
            {
              nodeID:"90",
              nodeTitle:"Documents & Forms",
              statusLine:"Documents & Forms SubMenu",
              subMenuNodes:[
                {
                  nodeID:"92",
                  nodeTitle:"Instructions",
                  nodeLink:"/documents_instructions.asp"
                },
                {
                  nodeID:"93",
                  nodeTitle:"Command Policy",
                  nodeLink:"/documents_policy.asp",
                  statusLine:"Command Policy Statements"
                },
                {
                  nodeID:"94",
                  nodeTitle:"Forms",
                  nodeLink:"/documents_forms.asp",
                  statusLine:"Command Forms"
                },
                {
                  nodeID:"100",
                  nodeTitle:"Task Management",
                  subMenuNodes:[
                    {
                      nodeID:"101",
                      nodeTitle:"Active Tasks",
                      nodeLink:"s:/pnma/nedu/nedu intranet/documents/taskmgmt/ta.pdf",
                      newWindow:true
                    },
                    {
                      nodeID:"102",
                      nodeTitle:"Schedule",
                      nodeLink:"s:/pnma/nedu/nedu intranet/documents/taskmgmt/schedule.pdf",
                      newWindow:true
                    },
                    {
                      nodeID:"103",
                      nodeTitle:"Deliverables",
                      nodeLink:"s:/pnma/nedu/nedu intranet/documents/taskmgmt/deliverables.pdf",
                      newWindow:true
                    }
                  ] // close of Task Management submenu items
                } // end of Task Management menu item
              ] // close of Documents & Forms submenu items
            }, // end of Documents & Forms menu item
            {
              nodeID:"130",
              nodeTitle:"Library",
              subMenuNodes:[
                {
                  nodeID:"131",
                  nodeTitle:"Catalog",
                  nodeLink:"/library_catalog.asp"
                },
                {
                  nodeID:"132",
                  nodeTitle:"Literature Search Request",
                  nodeLink:"/library_literaturesearch.asp"
                },
                {
                  nodeID:"133",
                  nodeTitle:"Reprint Request",
                  nodeLink:"/library_reprint.asp"
                }
              ] // close of Library submenu items
            }, // end of Library menu item
            {
              nodeID:"71",
              nodeTitle:"Navy",
              nodeLink:"/navy.asp"
            },
            {
              nodeID:"72",
              nodeTitle:"Diver",
              nodeLink:"/diver.asp"
            },
            {
              nodeID:"73",
              nodeTitle:"Medical",
              nodeLink:"/medical.asp"
            },
            {
              nodeID:"74",
              nodeTitle:"Science",
              nodeLink:"/science.asp"
            },
            {
              nodeID:"75",
              nodeTitle:"Non-Regulated Hazmat",
              nodeLink:"/Hazmat_appendix8.pdf",
              newWindow:true
            }
          ] // close of Home Page submenu items (main menu column)
        } // end of Home Page menu item
      ] // close of Root submenu items
    } // end of Root menu 
    }) // end of mainMenuTree 
  }); // end of menuTree

  var iNode = mainMenuTree.find("nodeID","100");
  mainMenuTree.openFolder(iNode);

Check a couple syntactic things: there is a missing comma and a missing semicolon according to jslint.com. Additionally, you might want to search for nodeID instead of noteID.

The code expands the target node when these corrections are made however the parent nodes are not expanded.

Sorry about the syntax errors. I caught them and was about to fix those in my example. The working code did not have those issues… they came when I shortened the tree for this example.

You indicated that once those three items were fixed, that the menu worked and opened the section specified while leaving the rest of the tree unexpanded. I still don’t get any expansion at all. I am using the 70RC2 release as my cradle with all modules included and no other code.

Yes. I commented the autoDraw: false line out and pasted the code into a 7.0RC feature explorer example on the smartclient.com site. If you expand down to the documents and forms you will notice that the task management folder is open (shows [-] and nodes below it). Note that the root and documents folders are NOT expanded by this call, only the one you specified.

If you want to expand all folders leading to this one you will need to call openFolders.

That’s what has me scratching my head here. I did the same thing and I get a closed tree showing only the top level NEDU Intranet Home Page folder. Nothing is open in the tree. The behavior you are getting is precisely what I WANT it to do but the openFolder call appears to do nothing in all my tests. I am running on an IE6 browser (no choice unfortunately) here. Wonder if that has anything to do with it?

A closed tree is what you will get. If you manually expand the root and documents folders you should then see the task folder already expanded. That is the intent of your call. Did you want all nodes down to the task folder expanded?

I guess that is what I want. Now the light dawns. I wondered why if I told it top open node 5 that it gave me that one ok. Yes, I want it to show the tree with all nodes neccesary to reach the folder in question opened. I guess I have been misunderstanding the way openFolder worked. Thanks for your patience!

Thanks to your last post and previous clues, I have figured it out! I am now finding the node I want as before and then using getParents on that node and then calling the resultant node list using openFolders. Thank you very much for your help!