0 Replies Latest reply on Jun 15, 2011 3:32 AM by Marko Weinhold

    a4j:poll gets incomplete response or stops working at random time

    Marko Weinhold Newbie

      Hello,

       

      I'm facing a problem with a4j:poll which I'm not able to solve. In an jsf/xhtml page there are several a4j:poll calls in order to rerender different parts of the page at different conditions. This works fine for most of the runtime, but sometimes the server response - although valid - does not contain all expected content data. In the case of another a4j:poll the server response doesn't contain the poll itsself so the polling simply stops.

       

      Any help on that issue is highly appreciated.

       

      The relevant parts of my source code:

       

      Poll that stops working:

      <h:fom>

           <a4j:poll id="eilpoll" interval="30000" reRender="eilpoll,newsflash,keepAliveTimerDiv" limitToList="true"/>

      </h:form>

       

      ...

       

      <t:div  id="newsflash" styleClass="newsflash" ...>

      ...

      </t:div>

       

      ...

       

      <t:div id="keepAliveTimerDiv" style="visibility:hidden;">

           <script>

           keepAliveTimer();

           </script>

      </t:div>

       

      Usual server response:

      ...

      <form id="eilpoll" name="eilpoll" method="post" action="/path/to/page.jsf" enctype="application/x-www-form-urlencoded" class=""><span style="display:none;" id="eilpoll:j_id666"><script type="text/javascript">//<![CDATA[

       

       

      A4J.AJAX.Poll('eilpoll',{'pollId':'eilpoll:j_id666','similarityGroupingId':'eilpoll:j_id666','parameters':{'eilpoll:j_id666':'eilpoll:j_id666'} ,'pollinterval':30000,'containerId':'j_id412'} );

       

      //

      //]]>

      </script></span><input type='hidden' ...

      ...

       

      Incomplete server response:

      ...

      <form id="eilpoll" name="eilpoll" method="post" action="/path/to/page.jsf" enctype="application/x-www-form-urlencoded" class=""><input type='hidden' ...

       

      It seems obvious that in the second server response the whole <span> part is missing, though i cannot figure out why. I didn't find any related exception in the log files.

       

      Poll with sometimes incomplete content data:

      <h:form id="globalPoll">

           <a4j:poll interval="30000"

                        reRender="globalPoll,#{reRender}"

                        onbeforedomupdate="globalOnbeforedomupdate(request);"

                        enabled="#{bean.pollingEnabled}"

                        limitToList="true"/>

      </h:form>

       

      with reRender containing a list of t:div-ids.

       

      Unfortunately i cannot send a server response for that issue.