Skip navigation
Currently Being Moderated

tree mystery

Apr 3, 2010 9:13 AM

I have a tree that is populated by an external xml file.

 

I have set up a handler that executes when a tree node label is clicked. This handler opens all child nodes of the clicked node.

 

However, I want the tree root node to be expanded in the same way when the xml is loaded and set as the tree dataprovider.

 

So I have set up a function to take care of this.

 

The problem is that the root node is not expanded, even if the exact same code is executed as when clicking a label to expand a node.

 

Tracing shows that everything is identical in the two cases.

 

So I wonder, why dont the tree expand at startup ?

 

Any help will be greatly appreciated as this drives me nuts...

 
Replies
  • Currently Being Moderated
    Apr 3, 2010 10:09 PM   in reply to toft

    Maybe you are running the code before the dataprovider and tree are ready?

    Try delaying with callLater or running the code on creationComplete or after

    the dataProvider is assigned.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points