3 Replies Latest reply on May 20, 2010 3:50 AM by iimirela

    paint2d refresh in IE

    iimirela

      Hi,

       

         I'm going out of my mind trying to figure this out. I'm using a captcha image generated with paint2d and (only) in IE, it does not get refreshed (the paint method is called, the rerendering does not work, I guess). Here's the sample:

       

       

       

      <a4j:form id="registerForm" rendered="#{!Bean.registered}">
         <rich:paint2D id="captcha" width="75" height="25" cacheable="false" 
                       data="#{PaintData}" format="gif" paint="#{Bean.paint}" /><a4j:htmlCommandLink action="#{Bean.actionRegister}" reRender="registerForm:captcha">
           <h:graphicImage value="/images/buttons/btSave.png"   title="#{pageMessages.enterButtonLabel}" />
      </a4j:htmlCommandLink>
      </a4j:form>

       

      PaintData is request scoped and Bean is sesison scoped.

      Richfaces version :  3.3.2.SR1

       

      Thanks.

        • 1. Re: paint2d refresh in IE
          ilya_shaikovsky

          add f:param with timestamp as done there http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf . It's just browser caching.

          1 of 1 people found this helpful
          • 2. Re: paint2d refresh in IE
            iimirela

            I added timestamp, like this:

             

             

            <rich:paint2D id="captcha" width="75" height="25" cacheable="false" 
             data="#{PaintData}" format="gif" paint="#{Bean.paint}">
            <f:param value="#{Bean.timeStamp}" name="time"/>  
            </rich:paint2D>
            

             

            but nothing happens. The getTimeStamp() method doesn't even get called (independently of the browser I use).

            • 3. Re: paint2d refresh in IE
              iimirela

              Hello,

               

                 I decided to use a4j:mediaOutput instead of paint2D:

               

              <a4j:mediaOutput element="img" createContent="#{Bean.paintMediaOutput}" 
                                                  style="width:75px; height:25px;" cacheable="false" value="#{PaintData}">
                  <f:param value="#{Bean.timeStamp}" name="time"/>
              </a4j:mediaOutput>
              

               

              and it works.

              Could it be that f:param and paint2d don't go along so well?

              Anyway, this works, in case anyone is interested.

              Thanks Ilya.