Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6761385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:11:00+00:00 2026-05-26T14:11:00+00:00

I create a composition template: <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> <h:panelGroup rendered=#{not empty

  • 0

I create a composition template:

<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">

    <h:panelGroup rendered="#{not empty userc.userb.user.id}">
        <h:panelGrid columns="3">
            <h:outputText value="Welcome, " />
            <h:outputLink value="profile.xhtml">
                <h:outputText value="#{userc.personb.person.name}" />
            </h:outputLink>

            <h:form>
                <h:commandLink action="#{userc.logout}">Log out</h:commandLink>
            </h:form>
        </h:panelGrid>
    </h:panelGroup>

    <h:panelGroup rendered="#{empty userc.userb.user.id}">
        <h:outputLink value="pages/login.xhtml">Login</h:outputLink>
    </h:panelGroup>
</ui:composition>   

My intention is to hide the first panelGroup if the user is not logged, if he does then I hide the second panelGroup then show the first one.

I’m trying do this but doesn’t work.
Any idea ?

Without login:

without login

After login:

with login http://img89.imageshack.us/img89/9866/0602nov.jpg

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:11:01+00:00Added an answer on May 26, 2026 at 2:11 pm

    In your entity.User class, replace

    private int id;
    

    by

    private Integer id;
    

    This way it will default to null instead of 0 and thus #{empty userc.userb.user.id} will be true. The common practice is anyway to use wrappers instead of primitives in entity’s properties.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to create something like this http://www.youtube.com/watch?v=UJ7E7uEZN00&feature=player_embedded can i create a composition and
According to the specification on http://dev.w3.org/html5/2dcontext/#dom-context-2d-globalcompositeoperation , the lighter composition is A plus B.
I've found a task on some Java programming competition. One must create class Sentence
I created template (template.xhtml) which resides in root context of application. I wanted to
The Java class CircularFifoBuffer in the package org.apache.commons.collections.buffer is non-generic, and can store objects
I have a page Create.xhtml that contains <p:calendar .... /> In another page List.xhtml,
Similar to this question , except .NET alternatives instead. Excerpt rom http://pipes.yahoo.com/pipes/ : About
I have a reasonably advanced (many patches and subpatches) quartz composition that was created
create table person ( name varchar(15), attr1 varchar(15), attr2 varchar(1), attr3 char(1), attr4 int
Create a flat text file in c++ around 50 - 100 MB with the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.