p:poll stopped but still fires network callui:repeat and p:pollPrimefaces p:poll update selector for classPopup is not getting opened when ajax request is firedNotification system with p:poll/pushCustom renderer not triggering listener for ajax eventExecute PrimeFaces p:poll concurrentlyhow to prevent to stop p:poll after navigating to another page in browserp:poll calling growl twiceHow to use attribute value in Javascript in JSF composite component?Restart the p:poll component if stopping it

What is the maximal acceptable delay between pilot's input and flight control surface actuation?

Why don't they build airplanes from 3D printer plastic?

How can I design a magically-induced coma?

How does Harry wear the invisibility cloak?

In chocolate terminology, what is the name of thinly sliced leaf-shaped toppings made from hot, smooth chocolate, used to form flower petals?

Punishment in pacifist society

Were the women of Travancore, India, taxed for covering their breasts by breast size?

In Toy Story, are toys the only inanimate objects that become alive? And if so, why?

Is mathematics truth?

My boss says "This will help us better view the utilization of your services." Does this mean my job is ending in this organisation?

Why didn't Thatcher give Hong Kong to Taiwan?

Field of a uniformly charged disk: integration question

How could reincarnation magic be limited to prevent overuse?

properties that real numbers hold but complex numbers does not

Can an intercepting fighter jet force a small propeller aircraft down without completely destroying it?

co-son-in-law or co-brother

Calculus Books, preferably Soviet.

Does the size of capers influence their taste?

What is this red bug infesting some trees in southern Germany?

Do artifacts count as creatures when they are put into a graveyard while March of the Machines is in play?

Declaring 2 (or even multi-) dimensional std::arrays elegantly

In mathematics is there a substitution that is "different" from Vieta's substitution to solve the cubic equation?

Map a function that takes arguments in different levels of a list

What exactly is a softlock?



p:poll stopped but still fires network call


ui:repeat and p:pollPrimefaces p:poll update selector for classPopup is not getting opened when ajax request is firedNotification system with p:poll/pushCustom renderer not triggering listener for ajax eventExecute PrimeFaces p:poll concurrentlyhow to prevent to stop p:poll after navigating to another page in browserp:poll calling growl twiceHow to use attribute value in Javascript in JSF composite component?Restart the p:poll component if stopping it






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have to stop and start a p:poll in JSF using some conditions... I am able to do that by putting the poll in a panelgrid and making the panelGrid rendered... I thought its working since the pollOperationStatus is not called after I made the panelGrid rendered false... When I show it , it restarts as well..
But there is a network call still firing ; which messes up many things ;How to deal it?



 <h:form>
My main form
</h:form>

<h:form id="mypollform">

<p:outputLabel id="currentTime" value="#myBean.counter" />
<h:outputText value="#myBean.startPoll" id="counter11" />

<p:panelGrid rendered="#myBean.startPoll">
<p:poll interval="8" widgetVar="poller" autoStart="true"
listener="#myBean.pollOperationStatus"
update=":#p:component('newServerID'),:#p:component('mypollform')" />
</p:panelGrid>
</h:form>









share|improve this question


























  • So you actually mean that you can start the poll, stop the poll but it then keeps on doing network calls? And if you start it again it is doing duplicate calls?

    – Kukeltje
    Mar 28 at 8:44











  • i didnt start again..but after stopping , there are network calls

    – Janier
    Mar 28 at 17:51











  • Then your original description was not fully correct. Effectively the stopping did not work correctly... The answer by @Selaron is your solution

    – Kukeltje
    Mar 28 at 19:31











  • Stopping works!.. its not calling any more of the listener... it just fires a network request...

    – Janier
    Mar 28 at 19:58











  • the answer by @Selaron is you solution focus on that please and accept the answer if it works

    – Kukeltje
    Mar 28 at 20:07

















1















I have to stop and start a p:poll in JSF using some conditions... I am able to do that by putting the poll in a panelgrid and making the panelGrid rendered... I thought its working since the pollOperationStatus is not called after I made the panelGrid rendered false... When I show it , it restarts as well..
But there is a network call still firing ; which messes up many things ;How to deal it?



 <h:form>
My main form
</h:form>

<h:form id="mypollform">

<p:outputLabel id="currentTime" value="#myBean.counter" />
<h:outputText value="#myBean.startPoll" id="counter11" />

<p:panelGrid rendered="#myBean.startPoll">
<p:poll interval="8" widgetVar="poller" autoStart="true"
listener="#myBean.pollOperationStatus"
update=":#p:component('newServerID'),:#p:component('mypollform')" />
</p:panelGrid>
</h:form>









share|improve this question


























  • So you actually mean that you can start the poll, stop the poll but it then keeps on doing network calls? And if you start it again it is doing duplicate calls?

    – Kukeltje
    Mar 28 at 8:44











  • i didnt start again..but after stopping , there are network calls

    – Janier
    Mar 28 at 17:51











  • Then your original description was not fully correct. Effectively the stopping did not work correctly... The answer by @Selaron is your solution

    – Kukeltje
    Mar 28 at 19:31











  • Stopping works!.. its not calling any more of the listener... it just fires a network request...

    – Janier
    Mar 28 at 19:58











  • the answer by @Selaron is you solution focus on that please and accept the answer if it works

    – Kukeltje
    Mar 28 at 20:07













1












1








1








I have to stop and start a p:poll in JSF using some conditions... I am able to do that by putting the poll in a panelgrid and making the panelGrid rendered... I thought its working since the pollOperationStatus is not called after I made the panelGrid rendered false... When I show it , it restarts as well..
But there is a network call still firing ; which messes up many things ;How to deal it?



 <h:form>
My main form
</h:form>

<h:form id="mypollform">

<p:outputLabel id="currentTime" value="#myBean.counter" />
<h:outputText value="#myBean.startPoll" id="counter11" />

<p:panelGrid rendered="#myBean.startPoll">
<p:poll interval="8" widgetVar="poller" autoStart="true"
listener="#myBean.pollOperationStatus"
update=":#p:component('newServerID'),:#p:component('mypollform')" />
</p:panelGrid>
</h:form>









share|improve this question
















I have to stop and start a p:poll in JSF using some conditions... I am able to do that by putting the poll in a panelgrid and making the panelGrid rendered... I thought its working since the pollOperationStatus is not called after I made the panelGrid rendered false... When I show it , it restarts as well..
But there is a network call still firing ; which messes up many things ;How to deal it?



 <h:form>
My main form
</h:form>

<h:form id="mypollform">

<p:outputLabel id="currentTime" value="#myBean.counter" />
<h:outputText value="#myBean.startPoll" id="counter11" />

<p:panelGrid rendered="#myBean.startPoll">
<p:poll interval="8" widgetVar="poller" autoStart="true"
listener="#myBean.pollOperationStatus"
update=":#p:component('newServerID'),:#p:component('mypollform')" />
</p:panelGrid>
</h:form>






jsf primefaces backing-beans






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 8:47









Kukeltje

9,7384 gold badges16 silver badges40 bronze badges




9,7384 gold badges16 silver badges40 bronze badges










asked Mar 28 at 1:26









JanierJanier

9951 gold badge12 silver badges44 bronze badges




9951 gold badge12 silver badges44 bronze badges















  • So you actually mean that you can start the poll, stop the poll but it then keeps on doing network calls? And if you start it again it is doing duplicate calls?

    – Kukeltje
    Mar 28 at 8:44











  • i didnt start again..but after stopping , there are network calls

    – Janier
    Mar 28 at 17:51











  • Then your original description was not fully correct. Effectively the stopping did not work correctly... The answer by @Selaron is your solution

    – Kukeltje
    Mar 28 at 19:31











  • Stopping works!.. its not calling any more of the listener... it just fires a network request...

    – Janier
    Mar 28 at 19:58











  • the answer by @Selaron is you solution focus on that please and accept the answer if it works

    – Kukeltje
    Mar 28 at 20:07

















  • So you actually mean that you can start the poll, stop the poll but it then keeps on doing network calls? And if you start it again it is doing duplicate calls?

    – Kukeltje
    Mar 28 at 8:44











  • i didnt start again..but after stopping , there are network calls

    – Janier
    Mar 28 at 17:51











  • Then your original description was not fully correct. Effectively the stopping did not work correctly... The answer by @Selaron is your solution

    – Kukeltje
    Mar 28 at 19:31











  • Stopping works!.. its not calling any more of the listener... it just fires a network request...

    – Janier
    Mar 28 at 19:58











  • the answer by @Selaron is you solution focus on that please and accept the answer if it works

    – Kukeltje
    Mar 28 at 20:07
















So you actually mean that you can start the poll, stop the poll but it then keeps on doing network calls? And if you start it again it is doing duplicate calls?

– Kukeltje
Mar 28 at 8:44





So you actually mean that you can start the poll, stop the poll but it then keeps on doing network calls? And if you start it again it is doing duplicate calls?

– Kukeltje
Mar 28 at 8:44













i didnt start again..but after stopping , there are network calls

– Janier
Mar 28 at 17:51





i didnt start again..but after stopping , there are network calls

– Janier
Mar 28 at 17:51













Then your original description was not fully correct. Effectively the stopping did not work correctly... The answer by @Selaron is your solution

– Kukeltje
Mar 28 at 19:31





Then your original description was not fully correct. Effectively the stopping did not work correctly... The answer by @Selaron is your solution

– Kukeltje
Mar 28 at 19:31













Stopping works!.. its not calling any more of the listener... it just fires a network request...

– Janier
Mar 28 at 19:58





Stopping works!.. its not calling any more of the listener... it just fires a network request...

– Janier
Mar 28 at 19:58













the answer by @Selaron is you solution focus on that please and accept the answer if it works

– Kukeltje
Mar 28 at 20:07





the answer by @Selaron is you solution focus on that please and accept the answer if it works

– Kukeltje
Mar 28 at 20:07












1 Answer
1






active

oldest

votes


















2















Primefaces 7 Documentation says:




Poll can be started and stopped using client side api; Or bind a
boolean variable to the stop attribute and set it to false at any
arbitrary time.




In your case this would be in javaScript:



PF('poller').stop(); or PF('poller').start();



Or bind a boolean bean property the the stop attribute of the p:poll:



<p:poll stop="#myBean.stopPoller" interval="8" widgetVar="poller" autoStart="true"
listener="#myBean.pollOperationStatus"
update=":#p:component('newServerID') :#p:component('mypollform')" />


Also beware that component IDs in update attribute are separated by space, not comma.






share|improve this answer






















  • 1





    From the documentation you refer to: "Multiple components to update can be specified with providing a list of ids separated by a comma, whitespace or even both." PrimeFaces ajax differs here from basic JSF, but it is better to adhere to the basic JSF. (off-topic: almost 3000 rep... close votes coming close)

    – Kukeltje
    Mar 28 at 8:43












  • Damn have so overseen that... thanks. (off-topic: And yes I'm working on it ^^)

    – Selaron
    Mar 28 at 9:01










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388866%2fppoll-stopped-but-still-fires-network-call%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2















Primefaces 7 Documentation says:




Poll can be started and stopped using client side api; Or bind a
boolean variable to the stop attribute and set it to false at any
arbitrary time.




In your case this would be in javaScript:



PF('poller').stop(); or PF('poller').start();



Or bind a boolean bean property the the stop attribute of the p:poll:



<p:poll stop="#myBean.stopPoller" interval="8" widgetVar="poller" autoStart="true"
listener="#myBean.pollOperationStatus"
update=":#p:component('newServerID') :#p:component('mypollform')" />


Also beware that component IDs in update attribute are separated by space, not comma.






share|improve this answer






















  • 1





    From the documentation you refer to: "Multiple components to update can be specified with providing a list of ids separated by a comma, whitespace or even both." PrimeFaces ajax differs here from basic JSF, but it is better to adhere to the basic JSF. (off-topic: almost 3000 rep... close votes coming close)

    – Kukeltje
    Mar 28 at 8:43












  • Damn have so overseen that... thanks. (off-topic: And yes I'm working on it ^^)

    – Selaron
    Mar 28 at 9:01















2















Primefaces 7 Documentation says:




Poll can be started and stopped using client side api; Or bind a
boolean variable to the stop attribute and set it to false at any
arbitrary time.




In your case this would be in javaScript:



PF('poller').stop(); or PF('poller').start();



Or bind a boolean bean property the the stop attribute of the p:poll:



<p:poll stop="#myBean.stopPoller" interval="8" widgetVar="poller" autoStart="true"
listener="#myBean.pollOperationStatus"
update=":#p:component('newServerID') :#p:component('mypollform')" />


Also beware that component IDs in update attribute are separated by space, not comma.






share|improve this answer






















  • 1





    From the documentation you refer to: "Multiple components to update can be specified with providing a list of ids separated by a comma, whitespace or even both." PrimeFaces ajax differs here from basic JSF, but it is better to adhere to the basic JSF. (off-topic: almost 3000 rep... close votes coming close)

    – Kukeltje
    Mar 28 at 8:43












  • Damn have so overseen that... thanks. (off-topic: And yes I'm working on it ^^)

    – Selaron
    Mar 28 at 9:01













2














2










2









Primefaces 7 Documentation says:




Poll can be started and stopped using client side api; Or bind a
boolean variable to the stop attribute and set it to false at any
arbitrary time.




In your case this would be in javaScript:



PF('poller').stop(); or PF('poller').start();



Or bind a boolean bean property the the stop attribute of the p:poll:



<p:poll stop="#myBean.stopPoller" interval="8" widgetVar="poller" autoStart="true"
listener="#myBean.pollOperationStatus"
update=":#p:component('newServerID') :#p:component('mypollform')" />


Also beware that component IDs in update attribute are separated by space, not comma.






share|improve this answer















Primefaces 7 Documentation says:




Poll can be started and stopped using client side api; Or bind a
boolean variable to the stop attribute and set it to false at any
arbitrary time.




In your case this would be in javaScript:



PF('poller').stop(); or PF('poller').start();



Or bind a boolean bean property the the stop attribute of the p:poll:



<p:poll stop="#myBean.stopPoller" interval="8" widgetVar="poller" autoStart="true"
listener="#myBean.pollOperationStatus"
update=":#p:component('newServerID') :#p:component('mypollform')" />


Also beware that component IDs in update attribute are separated by space, not comma.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 28 at 8:54

























answered Mar 28 at 7:14









SelaronSelaron

4,0182 gold badges21 silver badges30 bronze badges




4,0182 gold badges21 silver badges30 bronze badges










  • 1





    From the documentation you refer to: "Multiple components to update can be specified with providing a list of ids separated by a comma, whitespace or even both." PrimeFaces ajax differs here from basic JSF, but it is better to adhere to the basic JSF. (off-topic: almost 3000 rep... close votes coming close)

    – Kukeltje
    Mar 28 at 8:43












  • Damn have so overseen that... thanks. (off-topic: And yes I'm working on it ^^)

    – Selaron
    Mar 28 at 9:01












  • 1





    From the documentation you refer to: "Multiple components to update can be specified with providing a list of ids separated by a comma, whitespace or even both." PrimeFaces ajax differs here from basic JSF, but it is better to adhere to the basic JSF. (off-topic: almost 3000 rep... close votes coming close)

    – Kukeltje
    Mar 28 at 8:43












  • Damn have so overseen that... thanks. (off-topic: And yes I'm working on it ^^)

    – Selaron
    Mar 28 at 9:01







1




1





From the documentation you refer to: "Multiple components to update can be specified with providing a list of ids separated by a comma, whitespace or even both." PrimeFaces ajax differs here from basic JSF, but it is better to adhere to the basic JSF. (off-topic: almost 3000 rep... close votes coming close)

– Kukeltje
Mar 28 at 8:43






From the documentation you refer to: "Multiple components to update can be specified with providing a list of ids separated by a comma, whitespace or even both." PrimeFaces ajax differs here from basic JSF, but it is better to adhere to the basic JSF. (off-topic: almost 3000 rep... close votes coming close)

– Kukeltje
Mar 28 at 8:43














Damn have so overseen that... thanks. (off-topic: And yes I'm working on it ^^)

– Selaron
Mar 28 at 9:01





Damn have so overseen that... thanks. (off-topic: And yes I'm working on it ^^)

– Selaron
Mar 28 at 9:01








Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388866%2fppoll-stopped-but-still-fires-network-call%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript