I have a problem with p:poll
The thing is im using it all over my code, and it works fine. So the problem probably comes from somewhere else.. but i cant figure out where..
In this particular place, p:poll stops working after 50 seconds. I can't find either a solution or a similar answer.
<h:form>
<h:panelGroup id="check_sitting">
<h:panelGroup rendered="#{!(commonBean.idAnonymous eq null || commonBean.idAnonymous eq '') and !commonBean.hasShownLoginModal}">
<script>
$("#modalWelcome").modal("show");
</script>
</h:panelGroup>
</h:panelGroup>
<p:poll interval="1" listener="#{commonBean.listenpol}" update="check_sitting" />
</h:form>
The "listenpol" method is a test i am doing to check what is happening. But it's not helping..
public void listenpol(){
System.out.println("listenpol " + DateTime.now());
}
What happens: it refreshes correctly for about 50 seconds. After that, it stops.
Thanks in advance And sorry if its a dumb question. i just dont get it
EDIT:
im posting more code. I deleted the script. Right now it looks like this:
<h:body>
<div class="row">
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<ui:insert name="header">
<ui:include src="/template/common/commonHeader.xhtml" />
</ui:insert>
<ui:insert id="contentInsert" name="content">
<ui:include src="/template/common/commonContent.xhtml"/>
</ui:insert>
<ui:insert name="footer">
<ui:include src="/template/common/commonFooter.xhtml" />
</ui:insert>
</div>
</div>
</div>
<h:form>
<h:panelGroup id="check_sitting">
</h:panelGroup>
<p:poll interval="1" listener="#{commonBean.listenpol}" update="check_sitting" />
</h:form>
I repeat the problem: it printis out what the method says each second (note that this is the final behaviour im hoping to implement, its just a test) but it completely stops after 52 seconds... I really cant figure it out.
I also wanted to add: im using a few other p:poll around my code. maybe this is causing trouble??
Thanks again
h:panelGroup? Maybescriptcauses an error and therefore thep:pollstops? - Manuel