繁体   English   中英

另一个复合组件的f:facets标记内的复合属性

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM