Jsf 2 如何增加加载图像的时间
我在后台进程运行时使用p:dialog限制用户, 但一旦ajax完成,对话框就消失了,但我的查询仍在继续,等待localhost。 我想显示对话框,直到所有进程结束Jsf 2 如何增加加载图像的时间,jsf-2,primefaces,Jsf 2,Primefaces,我在后台进程运行时使用p:dialog限制用户, 但一旦ajax完成,对话框就消失了,但我的查询仍在继续,等待localhost。 我想显示对话框,直到所有进程结束 <p:dialog styleClass="confirm" modal="true" widgetVar="statusDialog" header="Loading..." draggable="false" closable="false" resizable="false" width=
<p:dialog styleClass="confirm" modal="true" widgetVar="statusDialog" header="Loading..."
draggable="false" closable="false" resizable="false" width="100"
height="50">
<div align="center">
<p:graphicImage value="../images/loading.gif" width="50"
height="50" />
</div>
</p:dialog>
也许你应该发布你的支持Bean,因为我尝试了你的代码,它可以工作。如果你在服务器端执行异步方法,你可以使用primefaces Ajax Poll来告诉何时隐藏你的对话框(而不是使用
p:commandLink
的oncomplete
)
<p:commandLink action="#{roundingBean.ClearBean()}" value="#{msg['header.label.RoundingRuleManagement']}" onstart="statusDialog.show();" oncomplete="statusDialog.hide();" />
public String ClearBean(){
countryCode=null;
roundingModeId=null;
roundingRuleName=null;
description=null;
roundingConstantIncrement=null;
roundingRuleList=null;
roundingModeDTOList=null;
return WebConstants.REDIRECT_ROUNDING_VIEW_PAGE;
}