As part of the dataTable on the seam JSF page, for one column, the name output is required:
<h:outputText value="#{listing.staffMember.name}"/>
The problem is that "staffMember" may be empty for some lists, so I get an 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 do not want any text to be displayed. I tried this:
<h:outputText value="#{listing.staffMember.name}" rendered="#{listing.staffMember != null}"/>
But the same error occurs.
How can I infer a property of an object that may be null?
source
share