4 Replies Latest reply on Jun 9, 2009 5:18 AM by sali1982

    ArrayCollection does not get data from httpService?!!

    sali1982

      Hi,

       

      I am trying to bind data from jsp file to ArrayCollection.

       

      I could successfully bind them to DataGrid, I do not know why I cannot bind it to ArrayCollection. Please help me:

       

      <mx:HTTPService id="Thejobs"  url="http://athena/QFLOW2/readData.jsp" result="readAll(event)"/>

       

      <mx:Script>
              <![CDATA[

                  import mx.utils.ArrayUtil;
                  import mx.rpc.events.ResultEvent;
                   import mx.collections.ArrayCollection;
                  [Bindable]
                  private var myArr:ArrayCollection = new ArrayCollection();
               
                  private function readAll(event:ResultEvent):void
                    {
                        myArr=event.result.list.JOBS;
                        noteText.text =  myArr.getItemAt(0).jobST; ///// I do not know why I cannot access it !!!!!!!
                    }    

          ]]>
          </mx:Script>

       

      My xml coming from jsp is like:

       

      <list>

         <JOBS>

             <jobRef>

                  109322

             </jobRef>

         </JOBS>

      .

      .

      .

      </list>

       

       

      Thanks a lot....