2 Replies Latest reply on Jul 13, 2010 2:52 AM by david.salter

    a4j:poll not refreshing

    david.salter

      Hi,

       

      I'm attempting to get the a4j:poll component working in RichFaces 4.0.0.A2 but not having much success.

       

      I've got a very basic Facelets page.

       

      <h:body>
      <a4j:region>

        <h:form id="form">

         <a4j:poll id="poll" interval="1000" enabled="true"
          reRender="poll,grid" />

        </h:form>

      </a4j:region>

      <h:form>

        <h:panelGrid columns="1" id="grid">

         <h:outputText id="serverDate" style="font-size:16px"
          value="Server Date: #{popBean.date}" />

        </h:panelGrid>

      </h:form>
      </h:body>

       

      The server side code is equally trivial:

       


      @Named
      @ApplicationScoped
      public class PopBean
      {
        
         public PopBean() {}

        
         public String getDate() {
          return new Date().toString();
         }

      }

       

      I'm expecting the date on the page to update every second but it just renders once and then never updates.  Any idea what I'm doing wrong?

       

      Thanks.