Wednesday, 15 May 2013

jsf 2.2 - JSF 2.2 conditional text based on EL tests not working -



jsf 2.2 - JSF 2.2 conditional text based on EL tests not working -

i have been searching solution , though seem have lot of options none of them seem working me. other solution have tried below, have tried various panelgrid/group combos el expressions in rendered attribute , c:if/otherwise no luck well. i'm running on wildfly 8.0 jee7

question: should in theory below code work? have absolute confidence email returning null if not logged in.

symptoms: displaying logged in html never not logged in html. regardless if userbean.email null or has value.

<ul class="loginbar pull-right"> <li class="topbar-devider"></li> <li><a href="page_faq.html">help</a></li> <c:if test="#{empty userbean.email}"> <li class="topbar-devider"></li> <li><a href="login">login</a></li> </c:if> <c:if test="#{not empty userbean.email}"> <li class="topbar-devider"></li> <li><a href="page_faq.html">hello: #{userbean.email}</a></li> <li class="topbar-devider"></li> <li><a href="logout">logout</a></li> </c:if> </ul>

jsf jsf-2.2

No comments:

Post a Comment