“labelField="@shortName” that is an e4x xml attribute reference and I would not expect it to work for an object property.  Try just

“labelField="shortName”.

 

“label” is just the default property it looks for as a label.  labelField orlableFunction is the right way to go.

 

Tracy


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Barry Beattie
Sent: Tuesday, July 25, 2006 1:00 AM
To: [email protected]
Subject: [flexcoders] treeview and

 

I've been trying to get my head around the treeview control, see where
it's useful for a project, work out what some of the limitations are.
as you can guess, Flex (and AS) is new to me....

I'm stuck on something I just don't get: when using an array of items
to populate a tree:

it seems that the field "label" is used as the label of the treeview.
In the tree I've tried labelField="@shortName" but still can't get
"shortName" to display as the label (eventually, label will NOT be a
valid field from the back end)

any idea how?

thanx

public var contacts1:Object = {label: "top", children: [
{label: "Acme", shortName:"AAAA", status: true, phone:
"243-333-5555", children: [
{label: "Sales", shortName:"BBBB", status: true,
phone: "561-256-5555"},
{label: "Support", shortName:"CCCC", status:
false, phone: "871-256-5555"}
]},
{label: "Ace", shortName:"DDDD", status: true, phone:
"444-333-5555", children: [
{label: "Sales", shortName:"EEEE", status: true,
phone: "232-898-5555"},
{label: "Support", shortName:"FFFF", status:
false, phone: "977-296-5555"},
]},
{label: "Platinum", shortName:"GGGG", status: false,
phone: "521-256-5555"}
]};

__._,_.___

--
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




__,_._,___

Reply via email to