title: How to show and hide if user is logged?
body: <p>I create a composition template:</p>
  
  <pre><code>&lt;ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:cs="http://java.sun.com/jsf/composite/composite"&gt;
  
      &lt;h:panelGroup rendered="#{not empty userc.userb.user.id}"&gt;
          &lt;h:panelGrid columns="3"&gt;
              &lt;h:outputText value="Welcome, " /&gt;
              &lt;h:outputLink value="profile.xhtml"&gt;
                  &lt;h:outputText value="#{userc.personb.person.name}" /&gt;
              &lt;/h:outputLink&gt;
  
              &lt;h:form&gt;
                  &lt;h:commandLink action="#{userc.logout}"&gt;Log out&lt;/h:commandLink&gt;
              &lt;/h:form&gt;
          &lt;/h:panelGrid&gt;
      &lt;/h:panelGroup&gt;
  
      &lt;h:panelGroup rendered="#{empty userc.userb.user.id}"&gt;
          &lt;h:outputLink value="pages/login.xhtml"&gt;Login&lt;/h:outputLink&gt;
      &lt;/h:panelGroup&gt;
  &lt;/ui:composition&gt;   
  </code></pre>
  
  <p>My intention is to hide the first <code>panelGroup</code> if the user is not logged, if he does then I hide the second panelGroup then show the first one.</p>
  
  <p>I'm trying do this but doesn't work.
  Any idea ?</p>
  
  <p>Without login:</p>
  
  <p><img src="https://i.stack.imgur.com/2VHbu.jpg" alt="without login"></p>
  
  <p>After login:</p>
  
  <p><a href="http://img89.imageshack.us/img89/9866/0602nov.jpg" rel="nofollow noreferrer">with login http://img89.imageshack.us/img89/9866/0602nov.jpg</a></p>