You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by andy wix <st...@hotmail.com> on 2004/10/04 12:52:31 UTC

back button

Hi,

Where my pages show a view of data, I have had to implement caching due to 
the amount of data that needs to be gathered (i.e., I don't go to the 
database - I can get away with the dirty read risk in this case).
A page might show:

name      group
fred        red        delete
john       blue       delete

where the the details are just read from objects in an arraylist in the 
session.

If I click delete for the john row, then john is deleted and if I click the 
browser's refresh button, the request for another delete is defeated by the 
use of tokens.
There is still a problem though when the user clicks the browser's back 
button.  It somehow finds the old session arraylist with john still in  it.
I have tried with and without caching set.  The request for the delete is a 
post.

Is there a standard scheme for coping with this problem?
Thanks,
Andy

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://www.msn.co.uk/messenger


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


Re: back button

Posted by Erik Weber <er...@mindspring.com>.
Shouldn't your "delete" encompass not only a database delete (which I 
assume is what you meant by "delete"), but also a delete from the cache 
(ArrayList)? Sorry if I don't understand.

Erik


andy wix wrote:

> Hi,
>
> Where my pages show a view of data, I have had to implement caching 
> due to the amount of data that needs to be gathered (i.e., I don't go 
> to the database - I can get away with the dirty read risk in this case).
> A page might show:
>
> name      group
> fred        red        delete
> john       blue       delete
>
> where the the details are just read from objects in an arraylist in 
> the session.
>
> If I click delete for the john row, then john is deleted and if I 
> click the browser's refresh button, the request for another delete is 
> defeated by the use of tokens.
> There is still a problem though when the user clicks the browser's 
> back button.  It somehow finds the old session arraylist with john 
> still in  it.
> I have tried with and without caching set.  The request for the delete 
> is a post.
>
> Is there a standard scheme for coping with this problem?
> Thanks,
> Andy
>
> _________________________________________________________________
> It's fast, it's easy and it's free. Get MSN Messenger today! 
> http://www.msn.co.uk/messenger
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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