I've been looking at this all the morning and I am starting to get desperate.
I have datatable and inside it var="message".
<h:dataTable value="#{usuarioMBean.usuario.recibidos}" var="message" id="messages" >
Message is a class that contains member recibe
private Usuario recibe;
I know the datatable works correctly and that the message is being set because when I try to use it without if, when or choose statements, it works.
One of my messages is null, however, when I try to check whether it is null, it doesn't work.
<h:outputText rendered="#{empty message.recibe}" value="text" />
<c:choose>
<c:when test="${empty message.recibe}">
Queja
</c:when>
<c:otherwise>
#{message.recibe.nombre} #{message.recibe.apellidos}
</c:otherwise>
</c:choose
Concretely, the h:outputText is never shown, neither is Nombre and Apellidos. However, Queja is shown always.
What I am trying to do is simply write "Queja" when the recibe is null.
Thanks.