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 149781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:11:07+00:00 2026-05-11T09:11:07+00:00

As part of a dataTable in a seam JSF page, one column requires the

  • 0

As part of a dataTable in a seam JSF page, one column requires the output of a name:

<h:outputText value='#{listing.staffMember.name}'/> 

The problem is that ‘staffMember’ may be null on some listings, so I get the error:

javax.el.ELException: /xxxxx.xhtml @42,67 value='#{listing.staffMember.name}': Error reading 'name' on type xxxx.model.AgentStaff_$$_javassist_152 

If the value is null, I don’t want any text rendered. I tried this:

<h:outputText value='#{listing.staffMember.name}' rendered='#{listing.staffMember != null}'/> 

But the same error comes up.

How can I output a property on an object that may be null?

  • 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. 2026-05-11T09:11:07+00:00Added an answer on May 11, 2026 at 9:11 am

    You could probably use the ternary operator, which would look something like:

    value='#{listing.staffMember != null ? listing.staffMember.name : 'None'}' 

    Or you could use the c:if tag.

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

Sidebar

Related Questions

i've got a jquery datatable (http://www.datatables.net/), and one column has a largish text field.
Part of my table design is to include a IsDeleted BIT column that is
Part of my code I get the OuterHTML propery <LI onclick=TabClicked(this, 'SearchName', 'TabGroup1');>Name so
I am populating one DataGridView in C# windows application. I have one DataTable in
Im trying to convert the output of a LINQ query to a datatable, I
ok here we go last part almost done! one error to go hmmmmm. This
As a newby in c# i am having a problem with getting a datatable
I made a datatable with 2 columns a transactionTime column and a numberOfTransactions column.
Here's a part of XAML of the application I'm working on: <ListView Name=lsvCustomerDetails ItemsSource={Binding
I want to achieve this using dynamic parameters for value expressions: <h:dataTable value=#{someBean.someValue} var=field>

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.