ping... 7 hours later I haven't come up with a solution.. anyone?
I suppose I could send the whole XMLList object to coldfusion as a
string and have Coldfusion parse it, but that seems like an unnecessary
use of network bandwidth when all I really want are the labels compiled
into an array and sent.
Rick
Rick Root wrote:
>
> So far, I've been unable to find examples of using a tree control and
> sending its data to a web service, remote object, etc. Lots of example
> code on using the tree control, enabling drag and drop, putting
> different kidns of data INTO the tree control- but nothing about getting
> the data out of it.
>
> My tree control is driven by an XMLList object. What i'd like to do is
> get an array of all the labels for each node, but I'm not having any luck.
>
> Here are my sample XMLList objects:
>
> <mx:XMLList id="treeData1">
> <node label="One item with subitem">
> <node label="Subitem"/>
> </node>
> </mx:XMLList>
> <mx:XMLList id="treeData2">
> <node label="One Item Only"/>
> </mx:XMLList>
>
> and here is my function that shows me the items in the tree:
>
> private function showList(list):void
> {
> var item:XML;
> txtResults.text = '';
> for each(item in list)
> {
> txtResults.text += "item: " + item.attribute('label') + '\n';
> if (item.elements().length() > 0)
> {
> showList(item.children());
> }
> }
> }
>
> Unfortunately, it doesn't seem to return the label on the root node.
>
> I've also tried adding the following line above the for loop to no avail:
>
> txtResults += list.attribute('label');
>
> Can someone point me in the right direction?
--
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
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/