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

    refresh a4j:mediaOutput

    pschuett

      Hallo,

      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.

       

      Ciao

        Peter Schütt

        • 1. Re: refresh a4j:mediaOutput
          mp911de

          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:

           

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

           

          Best regards,

          Mark