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

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?