Example, i have 20 charts. there are have time refresh different. When updateChart
, i'll dosomething and update success.
<c:foreach var="chart" items="#{bean.charts}>
<p:poll interval="#{chart.timeRefresh}" listener="#{bean.updateChart(chart)}"/>
<div>..draw one-by-one chart here.</div>
</c:foreach>
<p:commandButton id="showInforDialog" actionlistener="#{bean.dosomething()}" onsuccess="PF('dlgInfor').show();"/>
for example, alls chart have same time refresh and equal 1s. when i click button btnStopAllPoll
will call dosomething()
and will show dialog, but I have to wait a very long time. I think 20 request are processed in turn.
i have one idea, create button
and onclick
will stop all poll i tried :
<p:commandButton id="stoppAllPoll" onclick="stopAllPoll()"/>
but I do not know how to do it. please help me! or you have new idea. i don't understand why 20 request are processed in turn, or I'm wrong