I'm using Primefaces 3.5 and trying to display a "loading" image while updating a lazy-loaded datatable. In the following AjaxStatus element, the "ajax-loader" image is displayed when datatable is updated by a commandButton action. However when ajax call and table update is completed, the image does not disappear. In other words onComplete event is not received.
<p:ajaxStatus style="width:260px;" id="ajaxStatusPanel">
<f:facet name="start">
<h:graphicImage value="../images/ajax-loader.gif" />
</f:facet>
<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>
Here is a portion of the form that contains the commandButton and the datatable:
<h:form>
<p:panel toggleable="true" toggleSpeed="300" header="FILTER RESULTS">
<table align="center">
<tr>
<td>NAME: </td>
<td><h:inputText value="#{personBean.personLazyData.paramName}" /></td>
</tr>
<tr>
<td>PLACE OF BIRTH : </td>
<td><h:inputText value="#{personBean.personLazyData.paramPlaceOfBirth}" /></td>
</tr>
<tr>
<td colspan="2" align="center">
<p:commandButton value="Update" global="true"
actionListener="#{personBean.onFilterChanged}"
update="personListTable"/>
</td>
</tr>
</table>
</p:panel>
<p:dataTable id="personListTable" rendered="#{personBean.superUser}" var="person"
value="#{personBean.personLazyData}" emptyMessage="Not found."
paginator="true" rows="20" lazy="true" selection="#{personBean.selectedPersons}" global="true"
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
rowsPerPageTemplate="20,50,100">
<f:facet name="header">SURVEYS</f:facet>
<p:column selectionMode="multiple" style="width:2%" />
<p:column headerText="ID" >
<h:outputText value="#{person.id}"/>
</p:column>
<p:column headerText="NAME" >
<h:outputText value="#{person.name}"/>
</p:column>
<p:column headerText="SURNAME" >
<h:outputText value="#{person.surname}" />
</p:column>
</p:dataTable>
Is there anybody who have faced a similar issue?
Another note: In cases where datatable is not rendered (or if I change rendered attribute to false), the loading image is displayed and disappeared for a very short while since no data is retrieved.