I have in my topbar the following expression which give me the user picture from a user.
If there is no picture than i´m using the default.
My problem is now:
<p:graphicImage with library="morpheus-layout" is calling my function 3x
and#{userPictureRequestController.getUserPicture_32_32(loginBean.currentUser) == null}
<p:graphicImage only with the value calls the function only 1x
Any explanation?<p:graphicImage name="images/profile-image.png"
rendered="#{userPictureRequestController.getUserPicture_32_32(loginBean.currentUser) == null}" cache="true"
library="morpheus-layout" />
<p:graphicImage
rendered="#{userPictureRequestController.getUserPicture_32_32(loginBean.currentUser) != null}" cache="true"
value="#{request.contextPath}/files/#{userPictureRequestController.picture32Path}" />
Is there a better way to implement this?