RE: [flexcoders] Re: Flex 2b3 - Tree Problems

2006-05-19 Thread Josh Noland




Michael, thanks for the tree suggestions. 

To resolve the issue I had to add the @label along withthe showRoot = falseattribute on the tree control. I have included example code for others that may be experiencing tree problems.

Josh

mx:Tree id="menuItemsTree" labelField="@label" showRoot="false"/

 //Note menu is a ArrayColleciton from a remoteObject that returns the XML as a single stringcalled menu_xml_string
public static function formatMenuXmlForTree(menu:ArrayCollection):XMLDocument{ var menuXMLDocument:XMLDocument = new XMLDocument();menuXMLDocument.parseXML(menu.getItemAt(0).menu_xml_string);menuItemsTree.dataProvider = menuXMLDocument;}
Sample XML?xml version="1.0" encoding="utf-8"?menuitems menuitem menuID="70" label="Letters" menuitem menuID="71" label="A" / menuitem menuID="72" label="B" / menuitem menuID="73" label="C" / /menuitem menuitem menuID="74" label="Numbers" menuitem menuID="75" label="1"/ menuitem menuID="75" label="2"/ menuitem menuID="75" label="3"//menuitem/enuitems



To: flexcoders@yahoogroups.comFrom: [EMAIL PROTECTED]Date: Thu, 18 May 2006 22:10:16 +Subject: [flexcoders] Re: Flex 2b3 - Tree Problems--- In flexcoders@yahoogroups.com, "porsoc" [EMAIL PROTECTED] wrote: I have a string of valid XML that I want to show in a tree control. I  can not get the tree to render my XML. All it will show me is one  node with the entire XML string as the label.  Isn't a control is supposed to be able to render an XMLDocument  correctly.  Anybody see what I am doing wrong below?  public function setMenuInTree(menu:ArrayCollection):XMLDocument{  var menuXml:XMLDocument = new XMLDocument(menu.getItemAt (0).menu_xml_string);menuItemsTree.dataProvider = menuXml; }Make sure that you've set a labelField on the Tree in the form of'@attributeName', for example labelField="@label". Also verify that your data confirms to the requirements of theDefaultDataDescriptor or else you'll need your own impl ofITreeDataDescriptor. You might also verify that your XML string can be parsed into XML bytrying something like:myXMLTest:XML = new XML("myXMLString/");HTH,Michael--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
SPONSORED LINKS 



Web site design development 
Computer software development 
Software design and development 

Macromedia flex 
Software development best practice 


YAHOO! GROUPS LINKS 

Visit your group "flexcoders" on the web. 
To unsubscribe from this group, send an email to:[EMAIL PROTECTED] 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


Express yourself instantly with MSN Messenger! MSN Messenger





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] Re: Flex 2b3 - Tree Problems

2006-05-18 Thread Michael Montagna



--- In flexcoders@yahoogroups.com, porsoc [EMAIL PROTECTED] wrote:

 I have a string of valid XML that I want to show in a tree control. I 
 can not get the tree to render my XML. All it will show me is one 
 node with the entire XML string as the label.
 
 Isn't a control is supposed to be able to render an XMLDocument 
 correctly.
 
 Anybody see what I am doing wrong below?
 
 public function setMenuInTree(menu:ArrayCollection):XMLDocument{
  var menuXml:XMLDocument = new XMLDocument(menu.getItemAt
 (0).menu_xml_string);
  
  menuItemsTree.dataProvider = menuXml;
 }


Make sure that you've set a labelField on the Tree in the form of
'@attributeName', for example labelField=@label. 

Also verify that your data confirms to the requirements of the
DefaultDataDescriptor or else you'll need your own impl of
ITreeDataDescriptor. 

You might also verify that your XML string can be parsed into XML by
trying something like:

myXMLTest:XML = new XML(myXMLString/);

HTH,

Michael









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











Re: [flexcoders] Re: Flex 2b3 - Tree Problems

2006-05-18 Thread Bryan Choi



I wanna learn to my own impl of ITreeDataDescriptor.

May I have your sample code, if you enable to me?



- Original Message - 

From: Michael Montagna [EMAIL PROTECTED]

To: flexcoders@yahoogroups.com

Sent: Friday, May 19, 2006 7:10 AM

Subject: [flexcoders] Re: Flex 2b3 - Tree Problems





 --- In flexcoders@yahoogroups.com, porsoc [EMAIL PROTECTED] wrote:



 I have a string of valid XML that I want to show in a tree control. I 

 can not get the tree to render my XML. All it will show me is one 

 node with the entire XML string as the label.

 

 Isn't a control is supposed to be able to render an XMLDocument 

 correctly.

 

 Anybody see what I am doing wrong below?

 

 public function setMenuInTree(menu:ArrayCollection):XMLDocument{

 var menuXml:XMLDocument = new XMLDocument(menu.getItemAt

 (0).menu_xml_string);

 

 menuItemsTree.dataProvider = menuXml;

 }



 

 Make sure that you've set a labelField on the Tree in the form of

 '@attributeName', for example labelField=@label. 

 

 Also verify that your data confirms to the requirements of the

 DefaultDataDescriptor or else you'll need your own impl of

 ITreeDataDescriptor. 

 

 You might also verify that your XML string can be parsed into XML by

 trying something like:

 

 myXMLTest:XML = new XML(myXMLString/);

 

 HTH,

 

 Michael

 

 

 

 

 

  Yahoo! Groups Sponsor ~-- 

 Get to your groups with one click. Know instantly when new email arrives

 http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM

 ~- 

 

 --

 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

 

 

 

 

 

 

 







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












Re: [flexcoders] Re: Flex 2b3 - Tree Problems

2006-05-18 Thread Faisal Khan



I was wondering where one would post in order to hire
a Flex developer. Is this an appropriate forum?

Thank you.

__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












Re: [flexcoders] Re: Flex 2b3 - Tree Problems

2006-05-18 Thread Tariq Ahmed



Sure.

There's also a Job Postings on http://www.cflex.net, and 
http://groups.google.com/group/FlexJobs



Faisal Khan wrote:
 I was wondering where one would post in order to hire
 a Flex developer. Is this an appropriate forum?

 Thank you.
 









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.