[英]updating components on different page in primefaces 3.x
I am currently migrating our app from primefaces 2.21 to 3.2. 我目前正在将我们的应用程序从primefaces 2.21迁移到3.2。 i am aware that there are many new changes with 3.2.
我知道3.2带来了许多新变化。 I am trying to update a dialog with ajax request like below.
我正在尝试使用如下所示的ajax请求更新对话框。
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
//namespaces
template="MainTemplate.xhtml">
<ui:include src="dlgpath"/>
<h:form id="formId">
<p:datatable id="tab1">
<p:column>
<p:commandButton id="mdf" value="modify" oncomplete="dlg.show();"
update="dlgfrmid"/>
</p:column>
</datatable>
</h:form>
below is the code for the dialog 以下是对话框的代码
<p:dialog widgetVar="dlg">
<h:form id="dlgfrmid">
<p:panelGrid id="gridId"> </p:panelGrid>
<p:commandButton></p:commandButton>
</h:form>
</p:dialog>
i am getting the "infamous" Cannot find component with identifier "dlgfrmid" in the view error message i have done a lot of search, can some one help me understand the concept of component referencing in PF 3.x ... 我在视图错误消息中得到了“臭名昭著”的找不到标识符为“ dlgfrmid”的组件,我做了很多搜索,可以帮助我理解PF 3.x中组件引用的概念吗?
thanks any help appreciated 谢谢任何帮助
Try changing 尝试改变
<p:dialog widgetVar="dlg">
into 进入
<p:dialog appendToBody="true" widgetVar="dlg">
and 和
<p:commandButton id="mdf" value="modify" oncomplete="dlg.show();"
update="dlgfrmid"/>
into 进入
<p:commandButton id="mdf" value="modify" oncomplete="dlg.show();"
update=":dlgfrmid"/>
I've had a similar problem and I solved this by appending the dialog to body's html 我有一个类似的问题,我通过将对话框附加到正文的html来解决了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.