openNodes doesn't work very well in Flex 2.
You'll probably have to call expandItem in order from the top down so each parent the nodes you want to see is opened before the child nodes are opened. You can't use the .dataProvider property. You have to subclass and use the collection property ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of j_lentzz Sent: Monday, February 11, 2008 1:35 PM To: [email protected] Subject: [flexcoders] Re: How to programatically select a node in an XMLListCollection I'm using Flex 2 (if that matters any). So I need to expand all of the tree (or just to the nodes I want to select), then walk the dataProvider to find the nodes? John --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > In Flex 3, you can call expandItem or set openNodes to get all the nodes > to open, then I would subclass Tree and use the walk the collection > which should then contain the nodes you want and find the index of those > items and set selectedIndex appropriately. > > > > ________________________________ > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of j_lentzz > Sent: Monday, February 11, 2008 12:28 PM > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Re: How to programatically select a node in an > XMLListCollection > > > > I took a look at that post, but it doesn't address what I need to do. > I can find the node using the XML navigation methods, however, I want > to create a list of total nodes matched (there can be many) then allow > the user to jump from match to match, so I need to be able to select a > node and highlight it. Any thoughts? > > Thanks, > > John > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > , "Brad Bueche" <brad@> wrote: > > > > > http://www.brucephillips.name/blog/index.cfm/2006/12/5/Processing-XML-in <http://www.brucephillips.name/blog/index.cfm/2006/12/5/Processing-XML-i n> > <http://www.brucephillips.name/blog/index.cfm/2006/12/5/Processing-XML-i <http://www.brucephillips.name/blog/index.cfm/2006/12/5/Processing-XML-i > > n> > > > -Flex-20-Using-The-For-Each-Statement-And-The-Descendent-Accessor--Opera > > tor > > > > That should give you most of what you need to know. > > > > brad > > > > -----Original Message----- > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > ] On > > Behalf Of j_lentzz > > Sent: Monday, February 11, 2008 12:43 PM > > To: [email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders] How to programatically select a node in an > > XMLListCollection > > > > > > > > Hi, > > > > I have a Tree with the dataProvider being an XMLListCollection. When > > looking at the dataProvider with the debugger, all I see is a single > > XMLList that contains the complete XML structure - that is all the > > nodes and sub-nodes all in one element. I have a routine that will > > traverse the tree and find nodes based on parameters I set - and it > > will open those nodes. However, I want to be able to jump from found > > item to found item, but I can't find a way to set the index to > > highlight the item. Is there a way to do this that someone could > > explain? > > > > Thanks, > > > > John > > >

