How to use Boolean variable in c:if

Posted by Patriks on Stack Overflow See other posts from Stack Overflow or by Patriks
Published on 2012-10-06T09:31:35Z Indexed on 2012/10/06 9:37 UTC
Read the original article Hit count: 200

Filed under:
|
|

I am using this code in jsf

<c:if test="#{sV.done.booleanValue()}">
     <option value="#{sV.id}" selected="selected">#{sV.text}</option>
</c:if>
<c:if test="#{not sV.done.booleanValue()}">
     <option value="#{sV.id}">#{sV.text}</option>
</c:if>

sv is my class containing data (pojo), done is an Boolean variable, I want to display option tag with selected attribute if sV.done is true. But I couldn't make it. Don't know where I am wrong.

Otherwise there can be something worong with c? because c:forEach was not working before some time in my case in same page. it can be the reason? Where I am wrong?

© Stack Overflow or respective owner

Related posts about java

Related posts about jsf