2 Replies Latest reply on Dec 31, 2007 7:43 AM by 81Pantah

    How to get multiple lists to interact?


      I have a single HTTPService call that I use to return an XML file in E4X format to retrieve a list of courses and dates for a training class. I then want to populate the first list box with all of the "classes" ... when a user clicks on a class, I want to retrieve all of the "dates" (which are children of the class) and populate the 2nd list box. I can seem to get this working for the life of me. Here is a clip of my code:

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

      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="coursesRPC.send()" x="0" y="0">

      <mx:HTTPService id="coursesRPC" url="scripts/courses.php" resultFormat="e4x" />

      <mx:XMLListCollection id="courseColl" source="{coursesRPC.lastResult.department}" />

      <mx:TabNavigator id="nav2" width="800" height="510" x="100" y="95">
      <mx:Canvas label="Courses" width="100%" height="100%">
      <mx:Text x="24" y="33" text="Courses." fontFamily="Arial" fontSize="18"/>
      <mx:Text x="210" y="33" text="Dates." fontFamily="Arial" fontSize="18"/>
      <mx:List x="24" y="67" height="302" id="courseList" dataProvider="{courseColl}" labelField="@name" width="162" change="populateDateList(event)"></mx:List>
      <mx:List x="210" y="67" height="302" id="dateList" dataProvider="{courseColl}" labelField="@deptID" width="162"></mx:List>
      <mx:Text x="665" y="33" text="Participants." fontFamily="Arial" fontSize="18" textAlign="right"/>
      <mx:Button x="654" y="377" label="Print course list"/>
      <mx:Button x="525" y="377" label="Send reminders"/>
      <mx:Button x="397" y="377" label="Add participant"/>
      <mx:Button x="24" y="377" label="+"/>
      <mx:TabNavigator x="397" y="44" width="372" height="325">
      <mx:Canvas label="Enrolled" width="100%" height="100%" fontFamily="Arial" fontSize="16">
      <mx:Canvas label="Waitlist" width="100%" height="100%">

      Any help would be greatly appreciated!