我的JSF自定义组件代码:
<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>
如果我按如下方式指定所需属性,则此方法可以正常工作:
<comp:translation fieldName="myTranslation" required="true" />
但如果我在复合组件的必需属性中给出EL,则无效:
<comp:translation fieldName="myTranslation" required="#{param['someButtonId'] != null}" />
我们可以在复合组件的属性中提供EL吗?如果是,那么我错过了什么?