I've got the following problem (and after reading point 5 over here I'm using a Wildfly Server Version Full 11.0.0.Alpha1 with Mojarra 2.2.13.SP3 and PrimeFaces 6.0):
I've got a <p:poll> element inside a <p:accordionPanel> (of course also inside a <h:form> - detailed construction check out the code below). The accordionPanel element is updated from the backend as soon as a <p:commandLink> is pressed. Everything works fine, but after updating the accordionPanel it seems like another poll is created because in the same rhythm (1 Second) a new div is created... I can't find any clue where to look or even how to fix this behavior. As you can see in the code I also tried to stop any newly created poll - but without success. Are there any ideas?
Thank you very much guys!
Code:
[index.xhtml - shortened]
Code: Select all
<p:accordionPanel activeIndex="null" id="todoListe" value="#{todo.todos}" var="t">
<p:ajax event="tabChange" listener="#{todo.onTabChange}" />
<p:ajax event="tabClose" listener="#{todo.onTabClose}" />
<p:tab>
<!-- overrides title on tab-->
<f:facet name="title">
<h:form style="display: initial;">
<div style="float: right; margin-right: 3%; width: 25%;">
<p:commandLink action="#{todo.checkTodo()}" onclick="if(PrimeFaces.widgets['widget_countdownPoll']){PF('widget_countdownPoll').stop();}">
<p:graphicImage value="/resources/images/hook.svg" styleClass="checkTodo" id="hook" />
</p:commandLink>
</div>
</h:form>
<h:outputText value="#{t.title}" />
<h:form styleClass="noUpdate">
<h:outputText id="txt_count" value="#{t.remainingTime}" styleClass="#{t.busted ? 'notBusted' : 'busted'}" />
<p:poll interval="1" listener="#{t.setRemainingTime}" update="txt_count" id="countdownPoll" />
</h:form>
</f:facet>
[...]
</p:tab>
</p:accordionPanel>
Code: Select all
[Database-Stuff]
RequestContext.getCurrentInstance().update("todoListe");
RequestContext.getCurrentInstance().update("testGauge"); //not important for this problem in my eyes
RequestContext.getCurrentInstance().update("rankColumn"); //not important for this problem in my eyes
RequestContext.getCurrentInstance().execute("$('.GaugeXP').gaugeMeter();"); //not important for this problem in my eyes
RequestContext.getCurrentInstance().execute("$('.GaugeTodo').gaugeMeter();"); //not important for this problem in my eyes