5 Replies Latest reply on Sep 13, 2007 12:53 PM by Ilya Shaikovsky

    Unable to refresh an image using a4j:support

    JSF Guru Newbie


      Platform: Windows XP Professional SP2
      JDK: Sun JVM 1.5.0 Patch 8
      Application server: JBoss 4.0.5GA
      JSF: Apache MyFaces 1.1.4
      Facelets: Sun RI 1.1.11
      AJAX4JSF: 1.1.0
      Browser: FireFox 2.0, IE 7.0

      We have a requirement on a web page where a trend graph is loaded on the left-hand side and a number of parameters on the right-hand side. The idea is that if the user checks one of the parameters on the right-hand side, the trend graph should refresh and show the trends for that parameter.

      Code is as follows:

      <h:graphicImage alt="Trend" height="300" id="imgTrend" title="Trend" value="/TrendChartGenerator" width="600" />
       <h:selectBooleanCheckbox id="chk11">
       <a:support event="onchange" reRender="imgTrend" actionListener ="#{sampleBean.updateGraph}" ajaxSingle="true" limitToList="true">
       <a:actionparam name="unitId" value="11" />

      The problem I am facing is that on checking the box, the image does not refresh. If I try to refresh say a text box, that works fine.

      I am guessing this is because the browser is caching the image. My web page has a Cache-Control directive at the top, which is set to no-cache.

      Is there a way to make this work?