Hm – I’d be really interested in a bugfile if you could mail me one offlist 
showing this behavior.

 

A few things I’d suggest – it sounds like the XML is not fully updated before 
the tree shows the expanded node’s children. Try this – in your itemOpen 
handler, call event.preventDefault(), update the child nodes and then manually 
expand the node that was clicked on by calling expandItem(). When you update 
the child nodes, trace out the XML and verify the nodes were added in the 
correct order. 

 

Let me know how that works out for you. And if you can send me a file showing 
this behavior (you can mimic the server request), I can poke into it some more. 

 

-deepa

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of 
Persaud, Anthony
Sent: Tuesday, February 06, 2007 1:25 PM
To: [email protected]
Subject: RE: [flexcomponents] Tree Component 2.0.1

 

Yeah, I shoud. ☺ 

Basically, when the application loads, I load some XML information from the 
server side and it creates the initial tree. I have an ‘itemOpen’ event that 
makes another server request that bring some child nodes (in order to basically 
expand the contents of the hierarchy (of the tree control) dynamically. When I 
do that however, some of the child nodes that I append (using setChildren() ) 
become its siblings while other ones are correctly placed as children. Example: 

[+] MyFolderSibling1 
[+] MyFolder 
[+] MyFolderSibling2 


(clicking on + for MyFolder) produces (notice the change in numbers) 

[+] MyFolderSibling1 
[-] MyFolder 
[+] MyFolderChild1 
[+] MyFolderChild3 
[+] MyFolderChild2 
[+] MyFolderSibling2 


In some cases, I start getting duplicate entries of the item I opened in the 
tree. (so if the item I clicked to open was ‘MyFolder’, I would now have two 
siblings called ‘MyFolder’ – both with the same children). 


[+] MyFolderSibling1 
[+] MyFolder 
[+] MyFolderSibling2 

(clicking on + for MyFolder) produces (notice the change in numbers) 

[+] MyFolderSibling1 
[-] MyFolder 
[+] MyFolderChild1 
[+] MyFolderChild3 
[-] MyFolder 
[+] MyFolderChild1 
[+] MyFolderChild3 
[+] MyFolderSibling2 


I literally took the same code (MXML file) and complied it on a different 
machine that did not have the 2.0.1 update and it worked perfectly - so I'm 99% 
sure it was something in the new update that changed its behavior. 

________________________________________ 
From: [email protected] <mailto:flexcomponents%40yahoogroups.com>  
[mailto:[email protected] 
<mailto:flexcomponents%40yahoogroups.com> ] On Behalf Of Persaud, Anthony 
Sent: Tuesday, February 06, 2007 9:47 AM 
To: [email protected] <mailto:flexcomponents%40yahoogroups.com>  
Subject: [flexcomponents] Tree Component 2.0.1 

I’m new on this mailing list, so I am not sure if it has been discussed. Has 
anyone seen weird behavior on the Tree Component (doing dynamic updates to the 
structure) ever since the 2.0.1 update? And if so, any resources available 
(information)? 
  
Thanks, 
  
Anthony G. Persaud 

 

Reply via email to