2 Replies Latest reply on Apr 19, 2010 8:07 AM by Ilya Shaikovsky

    Problem with a4j:poll and rich:datascroller

    Carlo Salcuni Newbie

      Hi all,
      I'm using JSF in conjuction whit RichFaces and i'm  experiencing a really  strange problem:
      I made a simple jsf page who  have a <a4j:poll> polling a request  every 10 seconds, a  <rich:datatable> who use a  org.ajax4j.model.ExtendedDataModel and  a <rich:datascroller>.

      This is my jsf page:

      <a4j:region id="regionPoll" immediate="true">
      <h:form id="polling_form">
      <a4j:poll  id="order_poll" interval="10000" reRender="order_num"   limitToList="true" immediate="true" ajaxSingle="true"/>

      <h:outputText  id="order_num" value="#{testPool.randomNumber}"/>

      <div  align="center">
      <rich:dataTable  id="orders" value="#{testPoolView}" var="order"  rows="15"  width="70%">
      <rich:column id="col_1"  width="100px">
      <f:facet name="header">
      <h:outputText  value="Column 1"/>
      <h:outputText  value="#{order.id}"/>
      <rich:datascroller   id="scrollerOrders" for="orders" maxPages="3"  ajaxSingle="true"  immediate="true"/>

      When the  page is loaded for the first time, everything's fine.
      The very  strange think is then user click on datascroller to navigate  pages,  a  call to getRowCount() method is made every 10 seconds (every  time the  poll activates) !
      This weird behavior occurs only if  <a4j:poll> is used in the page.
      As you can see i tried to put  parameters to rerender only the  h:outputtext , so i wonder why the  framework try to update also the  datascroller calling the getRowCount  method (every 10 seconds ! ).

      Please help me, i searched  everywhere on Google but have not found an  answer.

      Thanks in  advance.