This is a page included (as we have seen) in the template and it is a rich:toolBar
with two rich:toolBarGroup
instances (one on the left and one with right alignment):
<rich:toolBar xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:rich="http://richfaces.org/rich"> <rich:toolBarGroup> <h:outputText value="#{projectName}:"/> <s:link view="/home.xhtml" value="Home" propagation="none"/> </rich:toolBarGroup> <rich:toolBarGroup location="right"> <h:outputText value="signed in as: #{identity.username}" rendered="#{identity.loggedIn}"/> <s:link view="/login.xhtml" value="Login" rendered="#{not identity.loggedIn}" propagation="none"/> <s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}" propagation="none"/> </rich:toolBarGroup> </rich:toolBar>
After the xmlns
declaration (used by Facelets), we can find the two groups with some texts and links inside. The group on the right contains the login link if the user is not logged in, and the user information and the logout link if the user is logged in.
Therefore, when no user is logged in, the page looks like:
When a user is logged in, it appears as follows:
As you can see, the part on the righthand side of the menu bar changes according to the identity.loggedIn
status of the variable.
3.138.124.194