5 Replies Latest reply on May 11, 2010 12:13 PM by Klajdi_Karanxha

    Repeater not Executing

    Stephen.Walker Level 1
      I am working on a project and using the repeter and all the data elements work except thost that are attached to the URL. I get the oh so not helpful error "Repeater not Executing". My guess is that I will need some type of event listener, but if somebody can explain why it would be appreciated. Just trying to learn.
        • 1. Re: Repeater not Executing
          Level 7

          "walker25419" <sneakyllama@gmail.com> wrote in message
          news:gfbscv$en2$1@forums.macromedia.com...
          >I am working on a project and using the repeter and all the data elements
          >work
          > except thost that are attached to the URL. My guess is that I will need
          > some
          > type of event listener, but if somebody can explain why it would be
          > appreciated. Just trying to learn.
          >
          > <mx:Button id="contractBtn"
          > enabled="{detail.currentItem.filename_contract}"
          > label="Contract" width="200" height="40" textAlign="left"
          > click="getURL('https://www.mywebsite.com//library/contract/'+detail.currentItem.
          > filename_contract)">

          By the time the click happens, the repeater is no longer repeating, so
          currentItem is null.

          HTH;

          Amy


          • 2. Re: Repeater not Executing
            Stephen.Walker Level 1
            @Amy - thanks

            I am more confused now. Once the repeater has fired the values are there. I can see them. I set a label to show me the value and when I reference the value of the label it comes back as undefined.
            • 3. Re: Repeater not Executing
              Level 7

              "walker25419" <sneakyllama@gmail.com> wrote in message
              news:gfcabd$3an$1@forums.macromedia.com...
              > @Amy - thanks
              >
              > I am more confused now. Once the repeater has fired the values are there.
              > I
              > can see them. I set a label to show me the value and when I reference the
              > value of the label it comes back as undefined.

              I answered this same question yesterday with a code example. Try checking
              the archives and see if you can find that post.


              • 4. Re: Repeater not Executing
                ntsiii Level 3
                And see currentItem in the docs. It is only accessible *while the repeater is executing*, not when you click the button.

                Find Amy's example. Hint: getRepeaterItem()

                Tracy
                • 5. Re: Repeater not Executing
                  Klajdi_Karanxha

                  Hello,

                  I am having the same type of error and it's been weeks now that I can't find the solution.

                  Inside the repeater I have repeating VBox-es which have ohter components inside.

                  A function initializes their inner components and getRepeaterItem() doesn't help me at all in this case. plus for other modules i've always used currentItem.

                  The code is partially like that:


                                                  <!-- Dialogue Sections -->   
                  ....

                  <mx:VBox>
                                  <mx:ViewStack id="mainView" childIndexChange="(sectionChanged(event))" width="100%" height="100%">
                                     
                                      <mx:Repeater
                                           id="sectionRepeat" repeatEnd="{tabContainer.selectedIndex = 0}"  dataProvider="{model.dialogue.sections}" >
                                             
                                              <components:DialogueSection section="{sectionRepeat.currentItem as DialogueSectionVO}"/>
                                     
                                      </mx:Repeater>
                                     
                                  </mx:ViewStack>
                                 
                  </mx:VBox>

                  .......