3 Replies Latest reply on Jan 15, 2010 11:34 AM by Gregory Lafrance

    Repeater not repeating !

    UbuntuPenguin Level 4

      TL;DR

      Last repeater out of 4 is not repeating nor is it added to the parent. Doesn't matter which repeater is in the fourth spot.

      Initialize , creationcomplete , preinitialize , addedToStage , repeatEnd , repeat ,  repeatStart events are never fired.

      However , the bindable data source is being called and is not empty and is present in the repeater.

       

      Hello Everyone ,

           I am having repeater problems.  I have a vbox filled with 4 repeaters.  The first 3 do their job , however the 4 repeater never "repeats". None of the lifecycle events are fired ( preinitialize , initialize , creationComplete , addedToStage ) or even the repeater specific events ( repeat , repeatStart , repeatEnd).  When I debug , I can see the repeater ,  and verify that it has a non-empty dataprovider so I know it is somewhere.

           The creepy thing is that it doesn't matter which repeater I put in the fourth spot , it still won't work.  A repeater that runs like a champ in positions 1 - 3 is completely ignored when placed in the fourth position.  There are no containers between 3 and 4 so I can't figure it out.

       

      Sincerely ,

        Ubuntu Penguin

        • 1. Re: Repeater not repeating !
          archemedia Level 4

          Can you isolate the problem and post it?

           

          d

          • 2. Re: Repeater not repeating !
            UbuntuPenguin Level 4

            I found the solution after 3 hours of searching this morning.  Apparently , if you list a group of repeaters , only the first one will execute.  Why 3 out of my 4 execute instead of 1 I don't know.  To beat this nefarious behavior , give each repeater its own container (V/HBox).

            • 3. Re: Repeater not repeating !
              Gregory Lafrance Level 6

              That's not it, as this code shows:

               

              <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
                <mx:Script>
                  <![CDATA[
                    import mx.collections.ArrayCollection;
                    [Bindable] private var ac1:ArrayCollection = 
                      new ArrayCollection([1, 2, 3, 4]);
                    [Bindable] private var ac2:ArrayCollection = 
                      new ArrayCollection([10, 20, 30, 40]);
                    [Bindable] private var ac3:ArrayCollection = 
                      new ArrayCollection([100, 200, 300, 400]);
                    [Bindable] private var ac4:ArrayCollection = 
                      new ArrayCollection([1000, 2000, 3000, 4000]);
                  ]]>
                </mx:Script>
                <mx:HBox width="100%" height="100%">
                  <mx:Repeater id="rp1" dataProvider="{ac1}">
                    <mx:Label text="{rp1.currentItem}"/>
                  </mx:Repeater>
                  <mx:Repeater id="rp2" dataProvider="{ac2}">
                    <mx:Label text="{rp2.currentItem}"/>
                  </mx:Repeater>
                  <mx:Repeater id="rp3" dataProvider="{ac3}">
                    <mx:Label text="{rp3.currentItem}"/>
                  </mx:Repeater>
                  <mx:Repeater id="rp4" dataProvider="{ac4}">
                    <mx:Label text="{rp4.currentItem}"/>
                  </mx:Repeater>
                </mx:HBox>
              </mx:Application>
              


              If this post answers your question or helps, please mark it as such.


              Greg Lafrance - Flex 2 and 3 ACE certified

              www.ChikaraDev.com

              Flex / AIR Development, Training, and Support Services