gpt4 book ai didi

java - Primefaces : How to update a grid/table in the parent form from a command button on the child form in a dialog (dialog residing on the parent form)?

转载 作者:行者123 更新时间:2023-12-02 05:59:11 25 4
gpt4 key购买 nike

我想通过按 id 为“updator”的按钮来更新 id 为“datatable”的表。 XHTML代码如下:-

<h:form id="mainForm">

<p:datatable id = "datatable">

---- columns ----

</p:datatable>

</h:form>

<p:dialog widgetVar="dlg" >

<h:form id="subForm">

various input fields
......
......
<p:commandButton id="updator" actionListener="#{javaBean.updateGrid()}" update="mainForm:datatable" oncomplete="dlg.hide()"/>

</h:form>

</p:dialog>

最佳答案

试试这个:update=":mainForm:datatable"

关于java - Primefaces : How to update a grid/table in the parent form from a command button on the child form in a dialog (dialog residing on the parent form)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22812706/

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