在复合组件的属性中使用EL

时间:2012-06-12 16:07:47

标签: jsf-2 facelets el composite-component

我的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吗?如果是,那么我错过了什么?

0 个答案:

没有答案
相关问题