My JSF custom component code:
<composite:interface name="translation">
<composite:attribute name="fieldName"/>
<composite:attribute name="required" default="true" />
</composite:interface>
<composite:implementation>
<h:inputText required="#{cc.attrs.required}" requiredMessage="Please enter #{cc.attrs.fieldName} in english"/>
</composite:implementation>
This works fine if I specify the required attribute as follows:
<comp:translation fieldName="myTranslation" required="true" />
But does not work if I give EL in required attribute of my composite component:
<comp:translation fieldName="myTranslation" required="#{param['someButtonId'] != null}" />
Can we give EL in attributes of composite components? If yes, then what I am missing?