Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

refresh image in itemrenderer

Avatar

Former Community Member
Hello,



I'm populating my tilelist with an itemrenderer. In this
itemrenderer I'm having an image and textbox. The textbox is
bindable, but my image isn't, because it's getting his source using
the image.load method. Is there any way I can refresh my image when
the datasource of the tilelist changes? (the textfield changes
properly).

Here's some examplecode.



private function init():void {

base64Dec = new Base64Decoder();

base64Dec.decode(data.comiccover); //used to decode the
incoming url

byteArr = base64Dec.toByteArray();

img.load(byteArr);

}



<mx:Image width="100" id="img" />

<mx:Text text="{data.title}" id="txtTitle" />



1 Reply

Avatar

Former Community Member
You might be able to add a collectionChange event listener to
the TileList dataProvider collection, and have that listener call
the function to reload the image.