I have the following code
<a4j:status id="commonstatus" onstart="#{rich:component('loading')}.show();" onstop="#{rich:component('loading')}.hide();" />
<rich:dataTable id="dTable" reRender="ds">
<rich:column id="name" filterMethod="#{myBean.filterName}">
...
<h:inputText> <a4j:support event="onkeyup" reRender="dTable, ds" ignoreDupResponses="true" requestDelay="700" oncomplete="setCaretToEnd(event);" /> </h:inputText>
...
<rich:datascroller id="ds" reRender="dTable">
...
<a4j:support event="onchange" reRender="dtable, ds" status="commonstatus" />
...
</rich:dataTable>
<rich:modalPanel id="loading" moveable="false" autosized="true">
<h:panelGrid columns="2">
<h:graphicImage value="images/progress.gif"/>
<h:outputText value="Loading..."/>
</h:panelGrid>
</rich:modalPanel>
Problem: Even if I have not specified status="commonstatus"
in <h:inputText>
I still get the loading image for onkeyup event.
What am I missing here?
Any help would be great.
The <a4j:status>
by default applies for all the components in the page that fire an ajax request. However, you can restrict the components that will be caught using the for
attribute as stated in the tag component documentation:
for: ID of the AjaxContainer component whose status is indicated (in the format of a javax.faces.UIComopnent.findComponent() call).