0 Replies Latest reply on Jan 21, 2010 7:10 AM by Scott R. Hamilton

    Inner nested repeater cannot be controled at repeat time

    Scott R. Hamilton

      I have two repeaters one nested within the other.


      The first one I can control at repeater run time by
      setting the
          AccRept.startingIndex = 0; //and...
          AccRept.count = 1;
      I can gain no control over the inner nested repeater
      as it does not respond to setting the startingIndex and
      count properties.  The entire data provider is stepped
      through instead.


      Here is the script section:


            public var WkLabel:Array=["Week One","Week Two","Week Three","Week Four"];
            public var DoWLabel:Array=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday", "Sunday"];
            public function initApp():void
            //Sets up the repeater controls with the right number of components
               //Accordion panes
               AccRept.startingIndex = 0;
               AccRept.count = 1;
               //Open the first pane
               if (AccRept.count > 0){
                   SPAcc.selectedIndex = 1;
               //DoW labels
               DayBlock.startingIndex = 3;
               DayBlock.count = 2;


        All of the elements in the DowLabel array are cycled through even though the
        DayBlock repeater's properties are set to start at 3 for a total of 2.
        Here are the control definitions:
            <mx:ArrayCollection id="acDOWNames" source="{DoWLabel}"/>
          <mx:ArrayCollection id="acAccPanes" source="{WkLabel}"/>


          <mx:Accordion x="10" y="10" width="900" height="600" id="SPAcc">
              <mx:Canvas label="Meal Plan" width="100%" height="100%">
              <mx:Repeater id="AccRept" dataProvider="{acAccPanes}">
                 <mx:VBox label="{AccRept.currentItem}" width="100%" height="100%">
                    <mx:Repeater id="DayBlock" dataProvider="{acDOWNames}"  >
                       <mx:HDividedBox width="100%" height="71" liveDragging="true" >
                          <mx:Canvas label="Canvas 1" width="100%" height="100%" backgroundColor="#FFFFCC">
                              <mx:Label x="10" y="10" text="{DayBlock.currentItem} - Breakfast"/>
                          <mx:Canvas label="Canvas 2" width="100%" height="100%" backgroundColor="#99ccff">
                              <mx:Label x="10" y="10" text="{DayBlock.currentItem} - Lunch"/>
                          <mx:Canvas label="Canvas 3" width="100%" height="100%" backgroundColor="#99cc99">
                              <mx:Label x="10" y="10" text="{DayBlock.currentItem} - Dinner"/>