nudastack
nudastack

Reputation: 165

PrimeFaces commandButton calls action about half a minute later

In my main page, I have a tool bar which contains some command buttons and links. Also I have a datatable that shows some vehicles data. The command buttons defined in the tool bar do not work properly. When I press the button, the action method is executed after 30-40 seconds later. What should be the cause of this problem?

Here is the tool bar:

<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" method:

public void refreshPage(){

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

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

    getVehicleList();
}

Upvotes: 0

Views: 262

Answers (1)

Prasad Kharkar
Prasad Kharkar

Reputation: 13566

Sometimes it occurs when the server is in debug mode. Check whether you are not running the app in debug mode.

Upvotes: 1

Related Questions