You have easy control over the way each node is displayed, via
labelFunction or itemRenderer, but by default, the Tree will display a
node for each node in the dataProvider.

 

You have two options.  The first is to preprocess the xml into the node
format that you want to see.  The other is to use a custom
TreeDataDescriptor.  Here is  link to the doc ont the subject.  It is a
bit complex.  I would really like to see a simple exmple that just
excludes some nodes.

http://livedocs.adobe.com/flex/201/html/about_dataproviders_057_15.html

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of fourctv
Sent: Saturday, November 10, 2007 8:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Tree displays xml node value, can I avoid that?
how?

 

I have a Tree control whose dataProvider gets an xml like:
<nodes>
<node label="a">
<node label="a.1"/>
<node label="a.2">data for node a.2</node>
<node label="a.3"/>
</node>
<node label="b">
<node label="b.1"/>
<node label="b.2"/>
</node>

The rendered tree looks like:
[+] a
a.1
[+] a.2
data for node a.2
a.3
[+] b
b.1
b.2


You see, the data value for element "a.2" gets displayed as a tree node.

Can I avoid that? I could not find any Tree property that allows me to
filter out element 
data values from being rendered.

TIA
julio

 

Reply via email to