Using EL in attribute of composite component

痴心易碎 提交于 2019-12-08 03:52:43

问题


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?

来源:https://stackoverflow.com/questions/11000501/using-el-in-attribute-of-composite-component

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!