4 Replies Latest reply on Aug 21, 2006 9:31 AM by Bob Flynn (IN Univ)

    Click one web service populated DG to populate another

    Bob Flynn (IN Univ) Level 1

      I'm building my first Flex app and am having some trouble. I don't know if the problem is with web services or just my understanding of the events in Flex. One method of my web service returns a list of speakers which I put in a data grid. I have that called on load.

      <mx:WebService id="speakerData"
      wsdl = " http://mydomain.com/myService.cfc?wsdl"
      load = "speakerData.getSpeakersInfo()" />

      This populates the main dataGrid with no difficulties. When you click a row of the grid I can populate other text components, load a picture, etc. One other thing I need to happen when you click the grid is to pass the speaker's ID and some other parameters back to the WS to run another method to get the times that particular speaker is available. I want to populate that result to another grid. Heck, it could be to a text area, I don't care. So I wrote this code:

      <mx:WebService id="availableSlots" wsdl = " http://mydomain.com/myService.cfc?wsdl">
      <mx:operation name="getAvailableSlotsForSpeaker">

      Now you'll note this is another WebService component to the same WS. I don't know if that makes a difference.

      In my second dataGrid I have the following:


      Should that not do it? Do I need some sort of click="" in the first DG to get it to fire? Do I need to pass the event to an AS function and have it call the WS and return the data? If so, what would that function look like and how/where would I call it?

      Thanks for your help. I've looked at examples and that has taken me this far, but I can't seem to get it the last mile.