Hi,
When you have to put an image that may or may not exist, how do you do it so 
that it shows an alternative image?

We have not found a way to configure this exception in the jewel image control 
and we have solved it with an html injection directly:


                    <j:Label multiline="true" width="117" height="117" 
click="onChangeImage()" visible="{personalModel.avatarImageModel.fileData == 
null}">
                        <j:html>
                        <![CDATA[<img style="border-radius: 50%; width: 100%; 
height: 100%;" class="jewel image image-roundBorder-body"
                        onerror="if (this.src != 'assets/avatarD.png') this.src 
= 'assets/avatarD.png';"
                        src="{personalModel.selectedItem.avatar}"/>]]>
                        </j:html>

                    </j:Label>

But I don't like this solution very much and if there was another way to do it, 
I would prefer to change it.
Any comments will be welcome.

Thank you.
Hiedra.

Reply via email to