2 Replies Latest reply on Sep 10, 2010 6:06 AM by ilya_shaikovsky

    how rerender a <a4j:mediaOutput>

    lovic

      <h:form>
      <table align="center" width="700px"> <tr><td>

       

      <rich:comboBox value="#{reportingBean.state}" valueChangeListener="#{reportingBean.selectionChanged}">
      <f:selectItems  value="#{reportingBean.devicesList}"/>
              <a4j:support event="onchange" reRender="do" />

       


      </rich:comboBox>
      </td>
      </tr>
      <tr>
      <td>
      <rich:panel style="width:700px; align:center;"  id="do">

       

      <a4j:mediaOutput element="img"
                       cacheable="false"
                       session="true"
                       createContent="#{reportingBean.generateChartReunionByMonth}"
                       mimeType="image/jpeg" />
      </rich:panel>
      </td></tr>
      </table>

       

      </h:form>h:form>

        • 1. Re: how rerender a <a4j:mediaOutput>
          lovic

          When I change value of rich:comboBox, I want to reRender a4j:mediaOutput. Value of a4j:mediaOut put  is the same, but #{reportingBean.generateCartReunionByMoth}is not called and in responce I have the same image.

          • 2. Re: how rerender a <a4j:mediaOutput>
            ilya_shaikovsky

            it's just got from cache. cacheable -  false prevents server side caching.. but client side still working. just define the value for mediaOutput to some random value or add f:param with random value as it done at demosite. In that case URL for img will be changed and it will be reloaded successfully.