Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf Primefaces命令按钮ajax事件集隐藏对话框_Jsf_Primefaces - Fatal编程技术网

Jsf Primefaces命令按钮ajax事件集隐藏对话框

Jsf Primefaces命令按钮ajax事件集隐藏对话框,jsf,primefaces,Jsf,Primefaces,我用的是PrimeFaces5.1。在我的项目命令中,单击按钮打开对话框可以正常工作。在测试操作中,我尝试隐藏对话框,但它不工作 detail.xhtml <p:commandButton value="test" action="#{stud.testAction}" ajax="false" onclick="PF('waitDialog').show();"/> <p:dialog id="waitDialog" widgetVar="waitDialog"> &

我用的是PrimeFaces5.1。在我的项目命令中,单击按钮打开对话框可以正常工作。在测试操作中,我尝试隐藏对话框,但它不工作

detail.xhtml

<p:commandButton value="test" action="#{stud.testAction}" ajax="false" onclick="PF('waitDialog').show();"/>

<p:dialog id="waitDialog" widgetVar="waitDialog">
<p:graphicImage url="#{stud.waitImage}"/>
</p:dialog>

我怀疑当设置commandButton属性ajax为false时如何隐藏对话框。

可能重复的如果您试图下载,可能的重复是正确的嘿,我没有测试您的代码,但我有一个问题。如果您为该方法放置了一个返回字符串,它是否会在方法完成时重新加载页面(这样等待对话框就应该关闭)?
public void testAction()
{
downloadMethod(toList)
RequestContext.getCurrentInstance.execute("PF('waitDialog').hide()");
}