PDA

View Full Version : Image source in ItemRenderer


blu3
08-10-2009, 02:50 PM
Hi,

I have a situation where i used custom ItemRenderer in TileList component. Item renderer basically consists of Image and Label component. Data provider is XML so Image and Label bindings are to data.@image and data.@desc which is displayed just fine.

My question is, how can i check before item is rendered if data.@image is empty and if it is, set a custom image (like image_missing.jpg or smth) as Image component source? I mean, i know a logic to check that but not sure where to implement it? I tried in ItemRenderer when creationComplete event is fired but with no success so if someone could help me a bit with a simple example or smth i would really appreciate it.

Thanks in advance,
Mirko