如何增加加载图像时间

时间:2013-12-26 08:06:02

标签: jsf-2 primefaces

我正在使用p:对话框在后台进程运行时限制用户, 但是一旦ajax完成,对话框就会消失,但我的查询仍在继续并等待localhost。 我希望在所有过程结束之前显示对话框

<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>

一样使用它
<p:commandLink action="#{roundingBean.ClearBean()}" value="#{msg['header.label.RoundingRuleManagement']}" onstart="statusDialog.show();" oncomplete="statusDialog.hide();" />

bean方法

public String ClearBean(){

    countryCode=null;
    roundingModeId=null;
    roundingRuleName=null;
    description=null;
    roundingConstantIncrement=null;
    roundingRuleList=null;
    roundingModeDTOList=null;


    return WebConstants.REDIRECT_ROUNDING_VIEW_PAGE;
}

0 个答案:

没有答案