1 Reply Latest reply on Oct 16, 2009 1:50 AM by Zwickie

    Problem displaying List of remote Images



      I'm having a problem displaying images from the server (BlazeDS) on the client side. What i want:

      1. store images as byte[ ] (JAVA) - working

      2. send these pictures in a List to the client via Remote Objects - working

      3. Binding the imagelist to a dataprovider(HorizontalList) - working

      4. display the list in a Flex Horizontal list , size: 50 * 50 pixel - NOT working

      5. display the selected Image in real size - working


      I'm instead seeing a list of "broken" images, BUT if i select one of these images, im getting the real-size image. Now I like to know a way to display these pictures. Here is the Code:


      <!-- pictures is an ArrayCollection containing ByteArrays -->
      <mx:HorizontalList id="imagelist" dataProvider="{pictures}" selectedIndex="0" >
            <!-- This isn't working, only the broken image symbol -->
            <mx:Image source="{data}" width="50" height="50" />
      <!-- This is working, showing the correct picture -->
      <mx:Image source="{imagelist.selectedItem.valueOf()}" width="400" height="250" />

      I do not know what if have done wrong? Could someone please help me out?


      PS: Funny thing, if i move the slider of the list some images appear, others dont. I am realy confused!