0 Replies Latest reply on Dec 29, 2006 12:07 PM by Dr._Goomba

    Proper usage of getItem() method

    Dr._Goomba Level 1
      I cant seem to find any good examples on the usage of the getItem() method for use with FDS.

      I am trying to create a simple Master/Detail app, I just cant seem to grasp the concept of how the recipient component is supposed to receive passed data, and how to retrieve the details of that passed data with getItem().

      My Master page looks something like:

      private var ds:DataService;
      private var temp
      private var musicItems:ArrayCollection;

      private function initApp():void{
      musicItems = new ArrayCollection();
      ds = new DataService("music-service");

      <mx:DataGrid id="musicGrid" dataProvider="{musicItems}"/>
      <mx:Button label="Music Details" click="currentState='musicDetail'(musicGrid.selectedItem.musicItemID)"/>

      1. What is the proper syntax for inserting the selected record into the click property with a 'currentState'?
      2. How do i accept musicItemID in the 'musicDetail' state using getItem()?

      Thanks for any suggestions!!!