![](/img/trans.png)
[英]JSF 2 — Composite component with optional listener attribute on f:ajax
[英]Composite attribute within f:facets tag of another composite component
假设我确实有一个复合属性elementId
。
<composite:implementation>
...
<x:popupTooltip>
...
<f:facet name="tooltip">
<rich:message for="#{cc.attrs.elementId}" />
...
#{cc.attrs.elementId}
在<f:facet .../>
标记内始终为空。 但是,添加<f:facet ... />
参数ouside,它将正确呈现。
如何在<f:facet .../>
标记内使用复合属性或<ui:param ... />
值(我也尝试过)?
EL始终在当前组件的上下文中进行评估。 您的<rich:message>
的#{cc}
实际上是指<x:popupTooltip>
。 最好的选择是将该属性传递给<x:popupTooltip>
以便它也知道该属性。
<x:popupTooltip elementId="#{cc.attrs.elementId}">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.