1 Reply Latest reply on Dec 30, 2009 9:24 AM by Gregory Lafrance

    (HTTPService -> result="" - to ArrayCollection) -  a question for super expert ;)


      Firstly look at my example then you will read the question:

      Look at example below - I'm using HTTPService component to retrieve data from SQL database
      (read_record.php is generating nice and tidy xml file with my data)


      <!-- (A) read  -->
      <!-- =================== HTTP SERVICE (read_record) ============================ -->
          <mx:HTTPService id="readTimed"


      Then 'result' is calling a function patient() which task is to assign 'event.result'
      to ArrayCollection called 'A_patient_dp'  (this ArrayCollection is a data provider
      for a specific data grid)


      private function patient(event:ResultEvent):void {


          trace("A - PATIENT - loaded...")


          A_patient_dp = event.result.patient.patient


      Everything looks great here, data grid shows all the data from xml file generated
      by read_record.php


      and now is my problem :


      I don't want to display all the data, I want HTTPService to retrieve only particular data
      which are described by variable {parametr} - this var is generated by my application


      I've dond it this way:


      <!-- (A) MAP POSITIONING -->
      <!-- =================== HTTP SERVICE (read_record) ============================ -->
          <mx:HTTPService id="readRequestA"
              <mx:request xmlns="">


      I'm looking into source of 'A_send_read_record.php' in the internet browser and I see
      exact data tree (filtered) which I need.
      The problem here is : how to call function patient(event:ResultEvent) and give it
      data from the event to be assigned to ArrayCollection - like in first example.


      Thanks for all the ideas !!