So what I am trying to achieve is, that my default image from the resource library is used, whenever the value attribute couldn't reference a proper image (e.g. no image uploaded/no image in the database).
Just to visualize it:
The user hasn't provided a profile pic, so bean.icon
should be null
.
<o:graphicImage value="#{bean.icon}" dataURI="true" /> (null isn't allowed as return value)
Now I would like the graphicImage component to display the default instead, semantically spoken:
<o:graphicImage name="img/default.png" dataURI="true" />
Is it possible to achieve this in an elegant way, perhaps without the use of JavaScript?