gpt4 book ai didi

jsf-2 - 使用复合 :insertFacet/renderFacet does not work inside t:dataTable

转载 作者:行者123 更新时间:2023-12-05 01:37:04 24 4
gpt4 key购买 nike

我这样做:
资源/虚拟机/table.xhtml:

...
<composite:interface>
<composite:facet name="dataBody" required="true"/>
</composite:interface>
...
<composite:implementation>
<t:dataTable>
<composite:renderFacet name="dataBody"/>
</t:dataTable>
</composite:implementation>
...

在 page.xhtml 中:
...
<vm:table>
<f:facet name="dataBody">
<t:column>
Testing.
</t:column>
</f:facet name="dataBody">
</vm:table>
...

问题:
不呈现“dataBody”方面。在 JSF1.2 中,我曾经使用 ui:insert 执行此操作,并且效果很好。

题:
为什么它不起作用,我应该如何使用模板作为替代?

另见: http://lists.jboss.org/pipermail/jsr-314-open-mirror/2009-September/001526.html

最佳答案

已解决:我不得不使用 insertChildren,然后一切正常:) 我花了 1.5 天才找到这个...现在看起来很简单。从 RichFaces3.3.3/JSF1.2 迁移到 RichFaces4.0/JSF2 需要大量的工作和学习。但我到了那里:)

资源/虚拟机/table.xhtml:

...
<composite:interface>
</composite:interface>
...
<composite:implementation>
<t:dataTable>
<composite:insertChildren/>
</t:dataTable>
</composite:implementation>
...

在 page.xhtml 中:
...
<vm:table>
<t:column>
Testing.
</t:column>
</vm:table>
...

关于jsf-2 - 使用复合 :insertFacet/renderFacet does not work inside t:dataTable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7891650/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com