net.java.dev.ajax4jsf a4j:poll only refreshes once in chrome

56 Views Asked by At

I am working on a JSF application that is using MyFaces 2.1.8, Tomahawk 1.1.13 & ajax4jsf 1.0.6

Assume for the moment that I do not want to go through the pain of upgrading versions or switching to use other frameworks.

I have the following page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
 xmlns:ui="http://java.sun.com/jsf/facelets"
 xmlns:f="http://java.sun.com/jsf/core"
 xmlns:h="http://java.sun.com/jsf/html"
 xmlns:t="http://myfaces.apache.org/tomahawk"
 xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
 template="/WEB-INF/templates/default.xhtml">

  <ui:define name="content">

    <h:form id="form1">

      <a4j:poll interval="1000" reRender="random1,random2" />

      <h:panelGrid columns="2">
        <h:outputText id="random1" value="#{mgdBean.random1}" />
        <h:outputText id="random2" value="#{mgdBean.random2}" />
     </h:panelGrid>

    </h:form>

  </ui:define>

</ui:composition>

When I browse to this page using Firefox 45.5.0 it happily refreshes and updates the random values every second.

When I browse to this page using Chrome 54.0.2840.100 it refreshes and updates the random values after 1 second and then stops refreshing.

I have 2 questions:

  1. is this down to something that I have done incorrectly or is it a limitation of the versions that I am using?

  2. if it is a limitation, is there another way to achieve the same result with the same versions?

0

There are 0 best solutions below