Primefaces 在Java Faces中找不到组件
我正在开发一个JavaServlet web应用程序,页面上出现了一个错误。我有一个Primefaces 在Java Faces中找不到组件,primefaces,Primefaces,我正在开发一个JavaServlet web应用程序,页面上出现了一个错误。我有一个命令按钮: <p:commandButton update="numbersEventFeedsForm" oncomplete="numbersEventFeedsDialog.show()" icon="ui-icon ui-icon-search" title="view increments" style="height:20px;"> <
命令按钮
:
<p:commandButton update="numbersEventFeedsForm" oncomplete="numbersEventFeedsDialog.show()"
icon="ui-icon ui-icon-search" title="view increments" style="height:20px;">
<f:setPropertyActionListener value="#{numbersEvent}" target="#{searchBean.selectedNumbersEvent}"/>
</p:commandButton>
我完全搞不懂为什么会出错。我已经阅读了其他问题,以确保使用
的id
作为update
属性的前缀,但我没有该属性,所以我现在有点卡住了 克里斯托弗
首先,表单“numbersEventFeedsForm”应该留在p:对话框中
如果您在页面的完整页面中使用“p:layout”,您还需要在p:dialog中定义属性“appendTo=“@(body)”,使其成为body标记的直接子级。如果不这样做,您的对话框可能不会出现
然后,当尝试在对话框中更新表单时,您应该使用“:numbersEventFeedsForm”来更新表单,除非commandButton位于引用的“表单”中,在这种情况下,您不需要“:”前缀
尝试进行此调整,看看是否有效。可能的重复
<h:form id="numbersEventFeedsForm">
<p:dialog header="Feeds" widgetVar="numbersEventFeedsDialog" resizable="false" width="1000"
styleClass="dialog">
<!-- Etc -->
</p:dialog>
</h:form>
Sep 13, 2013 4:32:33 PM com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback visit
SEVERE: javax.faces.FacesException: Cannot find component with identifier "numbersEventFeedsForm" in view.