I've been wrestling with this for over a week and haven't found a solution to this problem. Hoping someone can help.
I have a tree control that, at runtime, changes its dataProvider. In this case, I'm switching languages and the dataProvider format is XMLListCollection. I'd like to restore the open items of the tree after the dataProvider has changed. I tried using the openItems property, but openItems stores a list of XML objects from the original dataProvider. When the provider changes, the XML objects are of course different, and trying to reset the openItems property fails. What I really need is an "openIndices" property that is not tied to the XML data in the provider. The example Adobe gives (http://www.adobe.com/devnet/flex/quickstart/working_with_tree/) is not helpful since they switch between two dataProviders with the same content and they're using an ArrayCollection (I'm using an XMLListCollection). I've tried walking the tree but since the new Flex 2 tree control limits direct access to nodes, I could not find a way to detect the open indexes of the tree directly. Any ideas? Thanks, Oliver