1 Reply Latest reply on Oct 19, 2011 1:45 PM by Mark Paluch

    refresh a4j:mediaOutput

    Peter Schütt Newbie


      I want to refresh an a4j:mediaOutput by a button click.


      <a4j:mediaOutput id="myImage" element="img" cacheable="false" createContent="#{myBean.paintImage}" />


      <a4j:commandButton immediate="true" render="myImage"/>


      If I press the button the image is not refreshed.


      If I set execute="@form" for this button it works, but I do not want to refresh the whole form.


      I also try a4j:region around both but it does not work.


      Perhaps someone has an idea for me.


      Thanks for any hint.



        Peter Schütt

        • 1. Re: refresh a4j:mediaOutput
          Mark Paluch Master

          Hi Peter,

          i built your code by your example and it works for me. I suppose, that something on your page interferes with the rerender. I used following code:


                  <a4j:mediaOutput id="myImage" element="img" cacheable="false" createContent="#{pictureModel.getImage}" />
                  <a4j:commandButton immediate="true" render="myImage" />


          Best regards,