Use a Deterministic Technique for Generated Attributes
------------------------------------------------------

                 Key: STS-562
                 URL: http://www.stripesframework.org/jira/browse/STS-562
             Project: Stripes
          Issue Type: Improvement
          Components: Tag Library
    Affects Versions: Release 1.4.3
            Reporter: Walter Rumsby
            Priority: Minor


We created a servlet filter to provide a shallow implementation of ETags 
similar to the one described in http://www.infoq.com/articles/etags

When we applied this to a page that used a stripes:form with attribute focus="" 
we noticed that the filter was not working as we expected to and quickly 
realised that the issue was that the first field in the form did not have an 
explicit id attribute so Stripes was generating a random id in order to focus 
the first field in the form. This meant that the content of the response 
changed between requests and our so our ETag changed meaning a 304 would never 
be sent back to the client. If the generated ids were generated using a 
deterministic approach so that they were the same for every request this 
problem would be avoided.

A simple work around for this scenario is to explicitly set the id of the first 
field.

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

        

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to