2 Replies Latest reply on Feb 27, 2008 9:52 AM by binkerboy

    Accordian Child / RemoteObject Question

      Hi, all. I have an accordian nav that contains a form which is populated by selections from a datagrid (selecteditem). When I make the call, I do not get all the team members (saves passing unnecessary data).

      Currently there are three children, call them C1, C2, C3. C3 is the team members piece of the form and does not normally need to be populated by the remote object UNLESS the user clicks on it to open it for viewing. At that point, I want to make another call to the database for the members, again, based on the selecteditem in the datagrid. I am confused on how to do this. I cannot seem to add an evenlistener that catches the change and then gets the data.

      Thanks Flex guys.
        • 1. Accordian Child / RemoteObject Question
          m_hartnett Level 3
          See if this helps. You could put the data retrieval in the method based on either the label name or the id.

          <?xml version="1.0" encoding="utf-8"?>
          <!-- Tree control example. -->
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" backgroundGradientColors="[#c0c0c0, #c0c0c0]">


          public function clickHandler(e:Event):void {

          var itemLabel : String = e.currentTarget.selectedChild.label;
          var itemId : String = e.currentTarget.selectedChild.id;
          log.text = log.text + "Label: " + itemLabel;
          log.text = log.text + " Id: " + itemId + "\r";


          <mx:Accordion width="200" height="200" click="clickHandler(event)">
          <mx:Canvas id="can1" label="Canvas 1" width="100%" height="100%">
          <mx:Canvas id="can2" label="Canvas 2" width="100%" height="100%">
          <mx:Canvas id="can3" label="Canvas 3" width="100%" height="100%">
          <mx:Text id="log" width="332" height="200" fontWeight="bold"/>


          • 2. Re: Accordian Child / RemoteObject Question
            binkerboy Level 1
            mhartnett, if that really is your name, seems oddly to normal, what was the world like without internet and forums. Thanks, this gets me going in the right direction. I was muddled.