Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-4010

back port fix from JBSEAM-2292-Resources from resource servlet can't be re-rendered

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP 5.0.0, EAP 5.0.1
    • Fix Version/s: EAP_EWP 5.1.0
    • Component/s: Seam
    • Labels:
      None
    • Affects:
      Release Notes

      Description

      Found this after using the captcha:

      <div class="input">
      <a:region>
      <s:validateAll>
      <h:graphicImage value="/seam/resource/captcha" style="vertical-align:text-bottom;"/>
      <h:inputText tabindex="1" size="6" maxlength="6" required="true" id="verifyCaptcha" value="#

      {captcha.response}">
      <a:support status="#{statusId}" event="onblur" reRender="verifyCaptchaEntry"/>
      </h:inputText>
      </s:validateAll>
      </a:region>
      </div>

      This is a re-rendered s:decorate form field, so that onblur we get a new challenge (if the captcha repsonse was wrong). However, the graphicImage is not reloaded from the server, the browser caches it. To prevent browser caching, this is a quick hack:

      <div class="input">
      <a:region>
      <s:validateAll>
      <h:graphicImage value="/seam/resource/captcha?nocache=#{wiki:generateRandomNumber()}" style="vertical-align:text-bottom;"/>
      <h:inputText tabindex="1" size="6" maxlength="6" required="true" id="verifyCaptcha" value="#{captcha.response}

      ">
      <a:support status="#

      {statusId}

      " event="onblur" reRender="verifyCaptchaEntry"/>
      </h:inputText>
      </s:validateAll>
      </a:region>
      </div>

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manaRH Marek Novotny
                  Reporter:
                  manaRH Marek Novotny
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: