gpt4 book ai didi

JSF 复合 :insertFacet and composite:renderFacet

转载 作者:行者123 更新时间:2023-12-01 14:15:18 26 4
gpt4 key购买 nike

我想要一个包含一个方面的复合组件,我在这个复合组件的“实现”中实现了它。我的问题是 id,因为当我只在我的复合组件中定义然后将我的实现放入其中时,它只呈现它但组件在另一个地方。这是一个示例代码:

myComposition.xhtml

<composite:implementation>
<composite:renderFacet name="myFacet">
</composite:implementation>

myCompositionImpl.xhtml

<mySomething:myComposition>
<f:facet name="myFacet">
this code is rendered but the "component" which I define here is not placed
logically in the place where I defined the "renderFacet".
</f:facet>
</mySomething:myComposition>

我该怎么办?使用 composite:insertFacet 它不会渲染任何东西。我还需要该组件,因为我需要知道它的客户端 ID。

最佳答案

澄清一下:

您是否在组件的界面中指定了

另外你在另一个地方的意思是什么?

一些提示:

  • renderFacet 是正确的,insertFacet 用于在组合本身内定义的方面。
  • 尝试将“<!-- -->”添加为你的分面内容的第一行,这应该是解决单行分面内容错误的解决方法。

关于JSF 复合 :insertFacet and composite:renderFacet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5258840/

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