3 Replies Latest reply on May 9, 2011 8:13 AM by Ilya Shaikovsky

    a4j:poll getting data twice

    Martin Sadowski Newbie

      Hi,

       

      can perhabs someone help with this issue:

       

      https://issues.jboss.org/browse/RF-10974

       

      With following Frontend

       

      <a4j:poll interval="10000" data="#{testBean.pollData}" oncomplete="alert(event.data);"/>

       

      and bean:

       

      @ManagedBean

      @SessionScoped

      public class TestBean {

       

        int i = 0;

       

        public String getPollData() {

          System.out.println("getPollData()");

          return "" + i++;

        }

      }

       

      we get the following output:

       

      1

      3

      5

      ...

       

      Telling from the stacktraces the getter gets called in ApplyRequestValuesPhase and in RenderResponsePhase. Design or Bug?

       

      We are using Richfaces 4.0 on Tomcat 7.