is not interpreted as a pass-through element I do not understand why this part of the code works:

<a jsf:rendered= "#{...►"> is not interpreted as a pass-through element

I do not understand why this part of the code works:

<h:link value="Login" rendered="#{sessionBean.userInSessionBean == null}"  />

and this piece of code does not work:

<a jsf:rendered="#{sessionBean.userInSessionBean == null}">Login</a>
+4
source share
1 answer

An HTML element will only become a transition element if the following conditions are true:

  • There is at least one jsf:xxxattribute from the namespace http://xmlns.jcp.org/jsf.
  • There is at least one “ identity attribute ” associated with a particular JSF component.

<a> , JSF , <h:commandLink>, <h:outputLink> <h:link>. JSF , , jsf:xxx . jsf:rendered , JSF, JSF - , .

, , , <h:link>, jsf:outcome .

<a jsf:outcome="login" jsf:rendered="#{empty sessionBean.userInSessionBean}">Login</a>

, HTML <ui:fragment rendered>. . HTML-, <div> s?

+7

All Articles