I have a JSF Composite component that has an EL expression in the interface part, the code snippet below.
<cc:interface> <cc:attribute name="label" type="java.lang.String"/> <cc:attribute name="labelRendered" default="#{cc.attrs.label ne null}"/> </cc:interface> <cc:implementation> <h:outputText rendered="#{cc.attrs.labelRendered}" value="#{cc.attrs.label}"/> </cc:implementation>
Now my problem is that "default =" # {cc.attrs.label ne null} "gives an error.
java.lang.IllegalArgumentException: Cannot convert /resources/cc/label.xhtml @20,85 default="#{cc.attrs.label != null}" of type class com.sun.faces.facelets.el.TagValueExpression to class java.lang.Boolean
I am using JSF 2.0.4, EL 2.1, WAS 7
source share