【发布时间】:2016-09-22 04:54:56
【问题描述】:
我一直在尝试创建一个输出构面的复合组件。
header.xhtml
<composite:interface>
<composite:attribute name="headerLabel"/>
</composite:interface>
<composite:implementation>
<f:facet name="header">
#{cc.attrs.headerLabel}
</f:facet>
</composite:implementation>
我希望能够做一些类似的事情:
<p:datatable>
<app:header headerLabel="This is a test"/>
</p:datatable>
但是什么都没有被渲染。有没有办法做到这一点?谢谢!
【问题讨论】:
-
从未尝试过(奇怪的要求),但标签文件理论上应该可以工作:stackoverflow.com/q/6822000
标签: jsf jsf-2 composite-component facets