1 Reply Latest reply on Jul 2, 2008 12:11 PM by Paulo Freitas

    How to make a custom component reRendered by a4j

    Paulo Freitas Newbie

      Hey Fellows...

      I created a plain custom component that extends javax.faces.component.html.HtmlGraphicImage...

      What I want to do is reRender my component when a click in a a4j:commandLink. So I put the id of my component on the reRender list. Now when I click in the commandLink it calls the encodeBegin method of my component... I change some variables and as result the URL of src attribute should change... but nothing happens to the page... it's not being rerendered...

      there is something I need to do for the changes I make in encodeBegin takes effect on the page??


      sorry for possible english mistakes I commited... I came from BraziL!!

      Thx!!!

        • 1. Re: How to make a custom component reRendered by a4j
          Paulo Freitas Newbie

          I found the solution....

          just for the records....

          i should call these methods RenderBase.doEncodeBegin implementation:

          getUtils().encodeId(context, component);
           getUtils().encodePassThru(context, component);
           getUtils().encodeAttribute(context, component, CHART_DATA_PARAM_NAME);


          I still don't know what encodePassThru does... but it might do something...
          the jump of the cat I guess is that encodeAttribute call...
          so ... it works now... when I put my component's Id on a command link reRender list.... it does update my things on client side...

          =D