PrimeFaces commandButton大约半分钟后调用动作

时间:2013-08-19 07:58:58

标签: jsf-2 primefaces

在我的主页面中,我有一个工具栏,其中包含一些命令按钮和链接。我还有一个数据表显示一些车辆数据。工具栏中定义的命令按钮无法正常工作。当我按下按钮时,30-40秒后执行动作方法。这个问题应该是什么原因?

这是工具栏:

<p:toolbar height="30" switchType="client">
    <p:toolbarGroup align="left">
        <p:commandButton value="#{general.refresh}" icon="ui-icon-refresh" style="font-size:11px;"
            action="#{mainPage.refreshPage}" update="vehicleTable" ajax="false"/>  
        <p:commandButton value="#{general.service}" icon="ui-icon-wrench" style="font-size:11px;"/>
        <p:commandButton value="#{general.customerPointsShort}" icon="ui-icon-pin-s" style="font-size:11px;"
                            title="#{general.customerPoints}"/>
        <p:commandButton value="#{general.filtering}" icon="ui-icon-search" style="font-size:11px;"/>   
        <p:commandButton value="#{general.maximizeMap}" icon="ui-icon-arrow-4-diag" style="font-size:11px;"/>   
        <p:commandButton  title="#{general.showOnTeleAtlas}" icon="teleAtlasLogo" style="font-size:11px;"/>
        <p:commandButton  title="#{general.showOnGoogleMap}" icon="googleLogo" style="font-size:11px;"/>
    </p:toolbarGroup>
    <p:toolbarGroup  align="right">
        <h:outputText id="totalVhclId" value="#{general.totalVhclNumber} : #{mainPage.totalVhclNumber}" styleClass="coloredText1"/>
        <p:separator/>
        <h:outputText id="workingVhclId" value="#{general.totalWorkingVhclNumber} : #{mainPage.totalWorkingVhclNumber}" styleClass="coloredText1"/>
        <p:separator/>
        <h:outputText id="activeVhclId" value="#{general.totalActiveVhclNumber} : #{mainPage.totalActiveVhclNumber}" styleClass="coloredText1"/>
        <p:separator/>
        <h:outputText id="passiveVhclId" value="#{general.totalPassiveVhclNumber} : #{mainPage.totalPassiveVhclNumber}" styleClass="coloredText1"/>
    </p:toolbarGroup>
</p:toolbar>

“refreshPage”方法:

public void refreshPage(){

    selectedDate = "";
    totalMWD = "";
    totalDWD = "";
    errorMessages = "";
    selectedVehicle = null;

    if(checked.size() > 0)
        checked.clear();

    getVehicleList();
}

1 个答案:

答案 0 :(得分:1)

有时它会在服务器处于调试模式时发生。检查您是否在调试模式下运行应用程序。