Stopping ajax polling in jsf primefaces?
11,047
this code works like a charm in my case:
<p:poll interval="2" update="flightsTable" widgetVar="poll"
autoStart="false" listener="#{searchFlightBean.checkIfSearchCompleate}"/>
Method in searchFlightBean:
public void checkIfSearchCompleate() {
if(searchCompleate) {
RequestContext reqCtx = RequestContext.getCurrentInstance();
reqCtx.execute("poll.stop();");
}
}
Author by
wild
Updated on June 14, 2022Comments
-
wild almost 2 years
i am using prime-faces 3.2. Ajax polling is not get stopped, i am using stop attribute to stop the polling and i am trying to stop it form the bean using getter and setters for stop. Even i have used java script to stop but i can't. Any solution to stop polling?
-
wild over 11 yearspoll call will get stopped. but in firebug i can able to see the call running.it get stopped only after page refresh
-
Janier about 5 yearsdid you ever get a solution to this?