Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for 
change notification.

The following page has been changed by ebolaz:
http://wiki.apache.org/tapestry/Tapestry5HowToUsePersistentFieldStrategy

The comment on the change is:
intro text

------------------------------------------------------------------------------
  This example code creates a basic !PersistentFieldStrategy for "cookie" and 
"flashcookie" @Persist values[[BR]]
  [[BR]]
  [[BR]]
- This code is a 'trimmed back' version of what I use... Everything is b64 
encoded. click here (one day) for a posting of my (hopefully) code with 
embedded !ValueEncoder s.[[BR]]
+ This code is a 'trimmed back' version of what I use... Everything is b64 
encoded. You can encode a key of some sort (ValueEncoder index, or class type / 
name) but it adds extra complexity.[[BR]]
  [[BR]]
  [[BR]]
  The reason that I wanted to do this was because none of the existing 
persistence strategies fitted my requirements.[[BR]]
  The driving factor, as in so many web applications, was to aviod creating a 
session, and I '''really''' didn't like the large t:client:state cgi param. 
[[BR]]
  [[BR]]
  So, here you have it... my contribution to the tapestry corner. Enjoy![[BR]]
+ [[BR]]
+ Oh - a few Caveats, etc[[BR]]
+ first - when developing add a showAllCookies t:grid into your border 
component from !RequestGlobals.[[BR]]
+ flashcookie is safe, it doesn't hang around. I reccomend you use this for all 
flash / instant requirements[[BR]]
+ '''cookie can hang around after sessions'''... I delete all cookies on 
logout... but if you don't login (or just exit the browser), they are still 
there. I don't think this is safe.[[BR]]
+ all cookies are mapped to the entire app (context root). I don't know if this 
is strictly nessesary, but it works.[[BR]]
+ [[BR]]
+ Possible extensions:[[BR]]
+ set cookie max age (inactivity time)... where to get session timeout value 
from? [[BR]]
+ how to make cookies expire as soon as session is closed[[BR]]
  [[BR]]
  First of all, a contribution had to made in !AppModule:
  {{{

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to