【发布时间】:2012-03-30 19:48:12
【问题描述】:
我正在尝试更新 UI 重复中的元素,但不幸的是,我仍然没有发现如何从 dataTable 中正确处理 outputPanel。我知道这个问题来自不同的命名容器,但我希望有一个解决方案。
<h:body>
<h:form id="form">
<ui:repeat var="_entry" value="#{test.entries}">
<p:outputPanel id="counterPanel">
<h:outputText value="#{test.counter}" />
</p:outputPanel>
<p:dataTable var="_p" id="paramTable" value="#{_entry.params}">
<p:column headerText="Options">
<p:commandLink value="Update" update="counterPanel" />
</p:column>
</p:dataTable>
</ui:repeat>
</h:form>
</h:body>
上面的代码示例引发了以下异常:
javax.servlet.ServletException: Cannot find component with identifier "counterPanel" in view.
谢谢, 雅各布
【问题讨论】:
-
你能在生成的 html 源代码中看到 outputpanel 的 id 吗?也许在这里发布?
标签: ajax jsf primefaces