instanceof into a c:test?
Hello everybody,
I have a big problem,..
I have a JSF data table which can have several types of objects, some have an attribute called name others don't, so I need to have a conditional that depending on the kind of object to show the name (if they have it) or to show a specific string for example: ("Doesn't have"), so I tried this:
<c:choose>
<c:when test="#{null == document.name}">
<h:outputText value="Doesn't have"/>
</c:when>
<c:otherwise>
<h:outputText value="#{document.name}"/>
</c:otherwise>
</c:choose>
But this pulls me a message in console with something like:
javax.faces.el.PropertyNotFoundException: Bean: co.com.company.bo.document.MasiveDocumentBO, property: name
What should I do?
All objects inherits from a class DocumentBO which has all common attributes, inheriting from that class I have:
MasiveDocumentBO
InternDocumentBO
ExternDocumentBO
The first class doesn't have that attribute, what should I do?
Thanks a lot

