In Flex 2, we did not take rootedness into account for XMLLists and ArrayLists. This is something that we fixed in the updated 2.1 build which will be coming out soon.

 

As a workaround, you can pass the children of the topics node directly to the Tree (dataProvider='{xmlTopicTree.topics.children()}') or extend Tree and modify the set dataProvider code in Tree to toggle the _hasRoot storage variable to true.

 

HTH –

deepa

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jamiebadman
Sent: Monday, November 06, 2006 3:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] showRoot not working on mx:Tree ?

 

Hi,

Can anyone explain why with this code:

[Bindable] private var xmlTopicTree:XML = new XML('<root><topics
name="topics"><topic subject="one" id="33" parent_id="0"/><topic
subject="two" id="34" parent_id="0"/></topics></root>');
<mx:Tree id="topicTree" dataProvider="{xmlTopicTree.topics}"
labelField="@subject" showRoot="false"></mx:Tree>

it makes no difference if I have showRoot set to true or false ? It
seems that whatever I do, the root node shows the actual 'xml' on the
tree... I'm certain it's something dumb I'm doing/not-doing but can't
figure out what! Anyone have any clues ?!

Thanks,

Jamie.

__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to