[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-2292) Resources from resource servlet can't be re-rendered

Eric Jung (JIRA) jira-events at lists.jboss.org
Fri Oct 23 13:45:06 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBSEAM-2292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Jung updated JBSEAM-2292:
------------------------------

    Attachment: CaptchImage.diff


The response headers are incorrect in org.jboss.seam.captcha.CaptchaImage.java. Patch attached. It now works in IE 7.0.5730.13 and Firefox 3.5.3 *without* Christian's generateRandomNumber() hack.


> Resources from resource servlet can't be re-rendered
> ----------------------------------------------------
>
>                 Key: JBSEAM-2292
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-2292
>             Project: Seam
>          Issue Type: Bug
>          Components: JSF Integration
>            Reporter: Christian Bauer
>            Assignee: Shane Bryzak
>         Attachments: CaptchImage.diff
>
>
> 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>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list