How to use if, else condition in jsf to display image

后端 未结 3 674
花落未央
花落未央 2021-01-31 08:43

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 no

3条回答
  •  甜味超标
    2021-01-31 09:18

    Instead of using the "c" tags, you could also do the following:

    
    
    
    
    
    

    I think that's a little more readable alternative to skuntsel's alternative answer and is utilizing the JSF rendered attribute instead of nesting a ternary operator. And off the answer, did you possibly mean to put your image in between the anchor tags so the image is clickable?

提交回复
热议问题