Adobe Dreamweaver Forums



Last 10 THreads :         Adobe Flash 10 kills Wimpy (Last Post : midiwriter - Replies : 83 - Views : 955 )           »          Create 2nd animation in same flash file (Last Post : dabooj - Replies : 0 - Views : 1 )           »          Local host and php Solutions help... (Last Post : RJweb - Replies : 1 - Views : 6 )           »          problems linking PDFs (Last Post : Alan - Replies : 3 - Views : 4 )           »          Flash movie not working in html (Last Post : WEBDavid - Replies : 0 - Views : 1 )           »          load xml into mc symbols (Last Post : DigitalUprising - Replies : 0 - Views : 1 )           »          drop down menu over flash (Last Post : ltartisel - Replies : 2 - Views : 3 )           »          Flash-PHP Mail Form (Last Post : kglad - Replies : 3 - Views : 4 )           »          Flash Controls Not Displaying in Embedded File (Last Post : kglad - Replies : 5 - Views : 6 )           »          DW Flash Encoder (Last Post : wycn - Replies : 2 - Views : 3 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-21-2008, 12:15 PM
gallaharsha
 
Posts: n/a
Diggs:
Default Problems handling xml data for tree control.

Hi,
I have tried using tree control for displaying my xml data but I had a problem
that i did not have labels in my xml data. A sample xml data is attached. So it
displays the whole data at each level in the tree.
How do i solve this issue i,e get the tags names itself as labels..

Thanks in advance....




<CompositeData>
- <AttributeData>
- <CPUData>
<CPUTime>32</CPUTime>
</CPUData>
</AttributeData>

<Name>default:cimclass=SAP_ITSAMPerfProvider,type= SAP_ITSAMSystem.SAP_ITSAMProvi
ders,version=1,key1=value1</Name>
</CompositeData>



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-21-2008, 01:23 PM
gallaharsha
 
Posts: n/a
Diggs:
Default Re: Problems handling xml data for tree control.

An update after some efforts..
Could get the folders perfectly i.e until the level of CPUTime perfectly but
could not get the leaf: 32 since i used the following to set the label.
I would like to know if there is a way to find out if a node is a leaf or
folder and according set the label

private function treeLabel(item:Object):String
{

var node:XML = XML(item);

return node.localName();
}


and tree :

<mx:Tree x="573" y="34" id="tree" dataProvider="{xmldata}" enabled="true"
labelFunction="treeLabel"
width="395" height="521" itemClick="tree_itemClick(event)"
variableRowHeight="true" wordWrap="true"></mx:Tree>

Reply With Quote
  #3 (permalink)  
Old 11-21-2008, 02:53 PM
gallaharsha
 
Posts: n/a
Diggs:
Default Re: Problems handling xml data for tree control.

Ohh,,finally got it..
The following did the trick...

private function treeLabel(item:Object):String{

var node:XML = XML(item);
if(tree.dataDescriptor.hasChildren(item)){

return node.localName() ;
}
return node;
}

Reply With Quote


  #4 (permalink)  
Old 11-21-2008, 02:53 PM
gallaharsha
 
Posts: n/a
Diggs:
Default Re: Problems handling xml data for tree control.

Ohh,,finally got it..
The following did the trick...

private function treeLabel(item:Object):String{

var node:XML = XML(item);
if(tree.dataDescriptor.hasChildren(item)){

return node.localName() ;
}
return node;
}

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 12:51 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk