在 JSF 2 中 - 尝试重新渲染 2 个 ui:repeats 之间的面板组
说明我正在尝试做的事情的最佳方法就是举一个例子:
<h:form prependid="false" >
<h:panelGroup id="layer1">
<ui:repeat>
<h:panelGroup id="layer2>
<ui:repeat>
<h:panelGroup id="layer3">
<h:commandButton>
<f:ajax render="layer2" execute="@form" />
</h:commandButton>
</h:panelGroup>
</ui:repeat>
</h:panelGroup>
</ui:repeat>
</h:panelGroup>
</h:form>
当按下上面示例中的 h:commandButton
时,我从 JSF 得到一个异常,说 ID layer2< /代码> 不存在。
我怎样才能正确地做到这一点?
谢谢!
The best way to illustrate what i'm trying to do is just give an example:
<h:form prependid="false" >
<h:panelGroup id="layer1">
<ui:repeat>
<h:panelGroup id="layer2>
<ui:repeat>
<h:panelGroup id="layer3">
<h:commandButton>
<f:ajax render="layer2" execute="@form" />
</h:commandButton>
</h:panelGroup>
</ui:repeat>
</h:panelGroup>
</ui:repeat>
</h:panelGroup>
</h:form>
When pressing the h:commandButton
in the example above I get an exception from JSF saying that the ID layer2
does not exists.
How can I do this correctly?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下内容应该可以解决此问题:
它仅适用于 MyFaces,不适用于 Mojarra(目前)。它的
在很多方面都被破坏了。The following should work out for this:
It works in MyFaces only, not in Mojarra (yet). Its
<ui:repeat>
is broken in many ways.