在我的主页中,我有一个工具栏,其中包含一些命令按钮和链接。我还有一个显示一些车辆数据的数据表。工具栏中定义的命令按钮无法正常工作。当我按下按钮时,动作方法在 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>
“刷新页面”方法:
public void refreshPage(){
selectedDate = "";
totalMWD = "";
totalDWD = "";
errorMessages = "";
selectedVehicle = null;
if(checked.size() > 0)
checked.clear();
getVehicleList();
}