3 Replies Latest reply on Dec 11, 2007 7:46 PM by 2JZ


      Hi there,

      I am new to flex. I am working with arraycollection (as a dataprovider) to populate a list control with the dynamically generated XML ( generated as a result of query to a mysql database using PHP). The list control is getting populated if the generated XML contains more than one node (say 2,3...), but it is failing to get populated if the returned XML contains only one child node. Please help me out.

      MXML Snippet:
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="gridhttp.send()">
      public var userStoresList:ArrayCollection = new ArrayCollection();

      public function getuserStoresList(event:ResultEvent):void
      userStoresList = event.result.allUnits.unit;
      <mx:HTTPService id="gridhttp" url="xmlone.xml" result="getuserStoresList(event)" />
      <mx:List id="fetchedGridsList" dataProvider="{userStoresList}" />


      <?xml version="1.0" encoding="utf-8"?>

      If i remove the second node, with unitID=5 and recompile my mxml, the list control fails to get populated.
      Please do help me...

      Thanks in advance,