3 Replies Latest reply on Sep 9, 2008 11:57 AM by Newsgroup_User

    Repeater, Image, and WebServices

    NedKost
      Hello,

      I have a FLEX 3 web application that is displaying images using the following FLEX controls: Tile, Repeater, and Image (Image inside Repeater, which is inside the Tile control). This works fine if I create an ArrayCollection during Initialization, and bind the ArrayCollection to my Repeater. The problem comes when I try to use a WebService call to retrieve my data. The WebService correctly returns my data, which I put into the ArrayCollection. The web application then freezes up, and never displays my Images. If instead of populating the ArrayCollection I dynamically creating Image controls and add them to the Tile control, then it works fine. It is only when I try to use the Repeater that everything messes up. Any ideas on what is going on here? Here is some of my code:

        • 1. Re: Repeater, Image, and WebServices
          Level 7

          "NedKost" <webforumsuser@macromedia.com> wrote in message
          news:ga67dd$ehq$1@forums.macromedia.com...
          > Hello,
          >
          > I have a FLEX 3 web application that is displaying images using the
          > following
          > FLEX controls: Tile, Repeater, and Image (Image inside Repeater, which is
          > inside the Tile control). This works fine if I create an ArrayCollection
          > during Initialization, and bind the ArrayCollection to my Repeater. The
          > problem comes when I try to use a WebService call to retrieve my data.
          > The
          > WebService correctly returns my data, which I put into the
          > ArrayCollection.
          > The web application then freezes up, and never displays my Images. If
          > instead
          > of populating the ArrayCollection I dynamically creating Image controls
          > and add
          > them to the Tile control, then it works fine. It is only when I try to
          > use the
          > Repeater that everything messes up. Any ideas on what is going on here?
          > Here
          > is some of my code:

          Why not just use Image as the itemRenderer of your TileList and use
          ImagePath as the dataField?


          • 2. Re: Repeater, Image, and WebServices
            NedKost Level 1
            I just recently saw another post that recommended this approach. I tried it, and it does work. I still don't understand what the Repeater's problem is, but am willing to put it down to general flakiness.

            Ideally, I want the "Image" control to be a custom control I have that will display an image and do additional processing when the user clicks the Image (it will display a popup with additional data). So, now that I have the images displaying, I can't seem to get the Popup control to display... (it blurs out the background, but there is no additional window displaying). I guess that will be my next task....

            Thanks for the help,
            -Ned
            • 3. Re: Repeater, Image, and WebServices
              Level 7

              "NedKost" <webforumsuser@macromedia.com> wrote in message
              news:ga6g0k$ons$1@forums.macromedia.com...
              >I just recently saw another post that recommended this approach. I tried
              >it,
              > and it does work. I still don't understand what the Repeater's problem
              > is, but
              > am willing to put it down to general flakiness.

              TileList is expecting data in its dataProvider, not UIComponents.

              > Ideally, I want the "Image" control to be a custom control I have that
              > will
              > display an image and do additional processing when the user clicks the
              > Image
              > (it will display a popup with additional data). So, now that I have the
              > images
              > displaying, I can't seem to get the Popup control to display... (it blurs
              > out
              > the background, but there is no additional window displaying). I guess
              > that
              > will be my next task....

              You're welcome.