I have a condition where I have an enrollment form in which if userid is 0 it should show the dummy image and when I edit user from any update, I check for if userid which is not equal to 0 then display the image corresponding to userid.
I used JSTL inside jsf page. But always it tries to go to else loop for showing image. The functionality is working fine. The only thing is I can't display the dummy image when I visit the page first. Here s my code.:
<c:if test="${'#{user.userId}' == '0'}">
<a href="Images/thumb_02.jpg" target="_blank" ></a>
<img src="Images/thumb_02.jpg" />
</c:if>
<c:otherwise>
<a href="/DisplayBlobExample?userId=#{user.userId}" target="_blank"</a>
<img src="/DisplayBlobExample?userId=#{user.userId}" />
</c:otherwise>
Can I use this JSTL tag or can I do it using jsf?