1 Reply Latest reply on May 22, 2012 9:37 PM by Nirmalya Saha

    Problem with List refresh

    Maykec

      Hei,

      i'm having problem with List and Item Renderer. My Item Renderer has two spark components. Image and Label. With http service i retrive a bunch of images and text infos. But cuz of speed i'm downloading images later. So first i show only text in my list and image component is = null. I only see list of labels without pics. Then i start downloading images. When i download image i want to show it in my List immediately and here is a problem.

       

      for ex:

      arr.getItemAt(0).setImage(imgObj);

      where arr is arraycollection and is dataProvider for List.

       

      So, when i set the image, it wont refresh in List. It refresh only when i scroll down and then scroll up my List. If i use List.invalidateDisplayList() it wont fork. It works only if i'm refresing my arrayCollectioin for every load image. Thats not usefull cuz then List allways scroll up and u cant browse List till all images arent downloaded.

       

      Any ideas ?

      Tnx