set an attribute of  'isBranch="true"' on the xml node that you wish to
display as a branch
( ie [EMAIL PROTECTED] = true )
 
-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of xmwang1982
Sent: 19 February 2008 08:58
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tree Branch???
 
Hi Ryan,

Thanks. It seems data decriptor is only for reading properties, not 
changing.

Actually I think my problem is common, for example:

<Folder lable="1">
<file name="file1.txt"/>
<Folder lable = "1.1"/>
</Floder>

In the xml above, node named "Folder" should be always displayed as a 
branch. However, the default of flex tree is, if the node doesn't 
have sub nodes, display it as leaf. 

So the question comes up, how to set "isBranch" property base on node 
names?

Thanks a lot.

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Ryan Frishberg" <[EMAIL PROTECTED]> 
wrote:
>
> Check out dataDescriptor. You should be able to google (or search
> these forums) for it and get something on how to use this feature. 
If
> not, post back.
> 
> -Ryan
> 
> --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> , "xmwang1982" <askycn@> wrote:
> >
> > Thanks Raf,
> > 
> > However, what I need is something called "isBranchFunction", in 
which
> > we can set "isBranch" property base on e.g. node name.
> > 
> > Thanks.
> > 
> > --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> , "Rafael Faria"
> > <rafaelfaria.grupos@> wrote:
> > >
> > > actually you can define a function to "labelFunction".
> > > 
> > > Check
> > >
> >
> http://blog.flexexamples.com/2007/10/29/defining-a-custom-label-
<http://blog.flexexamples.com/2007/10/29/defining-a-custom-label-> 
function-on-a-flex-tree-control/
> > > 
> > > 
> > > raf
> > > 
> > > --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> , "xmwang1982" <askycn@> wrote:
> > > >
> > > > Hi experts,
> > > > 
> > > > Can we determine the "isBranch" property of a tree node in a
> > function? 
> > > > I need to set this property according to XML node name. It 
would be 
> > > > nice if we can define a function like "labelFunction". 
However it
> > seems 
> > > > not existing. 
> > > > 
> > > > I don't want to translate my XML to new XML <node lable=... 
> > > > isBranch=......> How to set the property in runtime? Thanks.
> > > >
> > >
> >
>
 

______________________________________________________________________
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
______________________________________________________________________

Reply via email to