I need to use a template for various classes and I'm trying to avoid the evaluation of the code inside the c:if because the bean class has getPrintResource() only if is extending a specific class.
I'm trying
<c:if test="${bean instanceOf PrintableClass}">...
<c:if test="${! empty bean.printResource}">...
to avoid the evaluation of this element
<c:if test="${...}">
<tag:printResource id="printBtn"
rendered="#{bean.printable}"
resource="#{bean.printResource}"
label="#{msg.print}">
</tag:printResource>
</c:if>
The only result achieved is the Property "printResource" not found on *bean*
Edit
Even if I am able to build a valid test for the c:if, the attribute resource would be evaluated as Property "printResource" not foundanyway.
My question is about avoiding the evaluation of a block of code if a test is false
Maybe my design is wrong or this isn't possible...
Thank you