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 wrong 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?
Every time it displays option tag without selected attribute.
As I mentioned in question, It seems to look like some other component/library is interfering in work of c:if, it didn’t work in any case. I tried all the suggestions given above. Thanks to all for replies.