struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kenk <kenkruege...@earthlink.net>
Subject RE: Is there such a thing as flash in S2?
Date Thu, 05 Jun 2008 00:38:51 GMT

GB,

I've finished implementing my use case using your FlashInterceptor and
FlashResult -- it worked perfectly and I didn't need to change anything in
your code.  :clap:  

But it did take me a while to achieve success, mainly owing to my newness to
Struts 2 and the difficulty I've had following the S2 documentation.  So
having said that, I have uploaded some revisions to your JavaDocs, in hopes
that they will help other newbies dealing with the whole flash scope issue,
perhaps you can add these.

The main feedback item I have on the code is the hard-coded "__flashMap" key
on the session -- this limits you to one flash scope at a time.  How about
having the FlashResult generate a random key value ( i.e. __flashMap_xxxxx
), send this as a request parameter, have the FlashInterceptor detect this
value and use it to access the map.  Poof!  No more issue with multiple
browser windows open.

For the refresh issue, have an optional configuration parameter on the
FlashInterceptor called "flashMapTimeout", defaulting to 60 seconds. 
Instead of immediately removing the flash map from the session, start a
java.util.Timer and remove it later.  Poof!  Now the refresh works (until
the timeout occurs).

Thanks again for making your code available!
Ken

http://www.nabble.com/file/p17659710/JavaDocAdditions.txt
JavaDocAdditions.txt 
-- 
View this message in context: http://www.nabble.com/Is-there-such-a-thing-as-flash-in-S2--tp16697840p17659710.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message