1 Reply Latest reply on Jan 8, 2011 2:07 AM by Shongrunden

    spark list would not populate with data

    aya

      hello everyone

       

      I have an xml file generated by php like so:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <stories>
      <category id="NewsItems">
      <description>NewsItems</description>
      <file>
      <name>two.xml</name>
      <description>2.46 kb</description>
      <source>NewsItems/two.xml</source>
      </file>
      <file>
      <name>makegallery.php</name>
      <description>1.81 kb</description>
      <source>NewsItems/makegallery.php</source>
      </file>
      </category>
      </stories>

       

      i am using httpservice to get data:

       


      <s:HTTPService id="myFileListService" url="myURLhere/getFiles.php"
                      fault="httpService_fault(event)"
                      result="onGetMyList(event)" resultFormat="e4x"/>

       

      heres my function

       

      [Bindable] private var fileList:ArrayCollection;


      private function onGetMyList(event:ResultEvent):void{
      fileList = event.result.stories.category.file as ArrayCollection;}

       

      this is my list
      <s:Panel title="Stories">
              <s:List dataProvider="{fileList}" labelField="name" width="100%" height="100%"/>
          </s:Panel>

       

      my problem is no errors occur but the list is not populated.

      But I can see(monitor) the data is returned by the service call properly.

       

      Any help in the right direction is appreciated.

      thanx

      ahmed