I think this was what Stacey was saying, but can you just update the 
label property of the objects in the dp instead of the object its 
self?


If nothing else works naturally, you could walk the list of tree 
items to find out which ones are open. 

You could have two trees that you swap whenever the language is 
changed, and do a loop that calls getIsOpen on each node, and then 
sets the state of the coresponding node in tree 2 by calling 
setIsOpen. Then swaps the display. If the user changes the lang 
again, swap back after the loop again (swapping tree1 for tree2, 
etc). Or you could avoid the two trees by storing it in an array, 
change DP, set values from array. But all of this is a bit of 
overkill. This is just kind of fun now :)

loop
{

  tree2.setIsOpen(tree2.getTreeNodeAt(i), tree1.getIsOpen
(tree1.getTreeNodeAt(i)), true, true);

}


Kind of a last resort, but might work (I didnt test the syntax, btw)

Karl Johnson
Cynergy Systems
http://www.cynergysystems.com

--- In [email protected], "Stacey Mulcahy" <[EMAIL PROTECTED]> 
wrote:
>
> Could you try perhaps setting a bindable prop for the labels? I 
assume
> you're done dataProvider.refresh() and its closes the nodes.
> 
> Or you could look into the XMLListCollection classes and do a
> notifyItemUpdate to the dataprovider if you are just changing a 
prop on the
> existing DP rather than the entire dp. 
> 
>  
> 
> Just throwing out wild ideas, but not sure if the actual 
implementation will
> work. 
> 
>  
> 
>   _____  
> 
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Ghislain Simard
> Sent: Tuesday, February 07, 2006 1:30 PM
> To: [email protected]
> Subject: [flexcoders] Tree dataprovider refresh
> 
>  
> 
> I am trying to maintain the state of open nodes in a tree control 
> after the dataprovider has changed.  In a multilingual application 
> tree data is stored in xml files, per language.  When the user 
toggles 
> the language a new xml file is loaded for the selected language, 
> unfortunately the tree control collapses all the nodes.  How can I 
> maintain the current open/closed state of each node so that only 
the 
> text changes and not the overall state of the tree.
> 
> Thanks for any help.
> If you have an example, that would be great.
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com 
> 
> 
> 
> 
> SPONSORED LINKS 
> 
> 
> Web
> <http://groups.yahoo.com/gads?
t=ms&k=Web+site+design+development&w1=Web+site
> 
+design+development&w2=Computer+software+development&w3=Software+desi
gn+and+
> 
development&w4=Macromedia+flex&w5=Software+development+best+practice&
c=5&s=1
> 66&.sig=L-4QTvxB_quFDtMyhrQaHQ>  site design development 
> 
> Computer
> <http://groups.yahoo.com/gads?
t=ms&k=Computer+software+development&w1=Web+si
> 
te+design+development&w2=Computer+software+development&w3=Software+de
sign+an
> 
d+development&w4=Macromedia+flex&w5=Software+development+best+practic
e&c=5&s
> =166&.sig=lvQjSRfQDfWudJSe1lLjHw>  software development 
> 
> Software
> <http://groups.yahoo.com/gads?
t=ms&k=Software+design+and+development&w1=Web+
> 
site+design+development&w2=Computer+software+development&w3=Software+
design+
> 
and+development&w4=Macromedia+flex&w5=Software+development+best+pract
ice&c=5
> &s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>  design and development 
> 
> 
> Macromedia
> <http://groups.yahoo.com/gads?
t=ms&k=Macromedia+flex&w1=Web+site+design+deve
> 
lopment&w2=Computer+software+development&w3=Software+design+and+devel
opment&
> 
w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.s
ig=OO6n
> PIrz7_EpZI36cYzBjw>  flex 
> 
> Software
> <http://groups.yahoo.com/gads?
t=ms&k=Software+development+best+practice&w1=W
> 
eb+site+design+development&w2=Computer+software+development&w3=Softwa
re+desi
> 
gn+and+development&w4=Macromedia+flex&w5=Software+development+best+pr
actice&
> c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>  development best practice 
> 
>  
> 
>  
> 
>   _____  
> 
> YAHOO! GROUPS LINKS 
> 
>  
> 
> *      Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders> " on the web.
>   
> *      To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]
subject=Unsubscribe> 
>   
> *      Your use of Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/>  Terms of Service. 
> 
>  
> 
>   _____
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to