You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by James Sherwood <js...@rgisolutions.com> on 2008/06/02 14:31:25 UTC

Repost: T3: Stop back button view of a form

Hello,

I was told I posted this in the wrong spot so I am sending to the list again and hopefully it goes in the right spot..

I am trying to stop users from submitting a form and then pressing the back button and seeing the form again.  I would like to either redirect them somehow or just show them a session expired.

Any ideas?

Thanks,
--James

Re: Repost: T3: Stop back button view of a form

Posted by James Sherwood <js...@rgisolutions.com>.
Lance,

Thanks, That is actually what we are trying right now.

We are taking the route of an onload where it just checks a service(or maybe 
a cookie we havent nailed that down) to see if they have submitted and just 
does a redirect if they have.

--James

----- Original Message ----- 
From: "Lance Java" <la...@googlemail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Monday, June 02, 2008 9:59 AM
Subject: Re: Repost: T3: Stop back button view of a form


> Ok, here's a solution... use an onload script to either
> a) populate a zone with the form fields
> b) populate the zone with an already submitted message
> This way the form will not be in the browser's cache.
>
> If you want to redirect you'll need to use javascript since it'll be an 
> ajax
> request.
>
> Cheers,
> Lance.
>
> 2008/6/2 Lance Java <la...@googlemail.com>:
>
>> Not really possible I'm sorry, when a user hits the back button, the page
>> they are viewing is in their browser cache (ie not a serverside hit).
>> Probably the best solution is to set a flag (persistant property or in 
>> the
>> db) on first form submit then fail any subsequent submits by redirecting 
>> to
>> an error page.
>>
>> Cheers,
>> Lance.
>>
>> 2008/6/2 James Sherwood <js...@rgisolutions.com>:
>>
>> Hello,
>>>
>>> I was told I posted this in the wrong spot so I am sending to the list
>>> again and hopefully it goes in the right spot..
>>>
>>> I am trying to stop users from submitting a form and then pressing the
>>> back button and seeing the form again.  I would like to either redirect 
>>> them
>>> somehow or just show them a session expired.
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>> --James
>>
>>
>>
>
>
>
> __________ Information from ESET Smart Security, version of virus 
> signature database 3151 (20080602) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Repost: T3: Stop back button view of a form

Posted by Lance Java <la...@googlemail.com>.
Ok, here's a solution... use an onload script to either
a) populate a zone with the form fields
b) populate the zone with an already submitted message
This way the form will not be in the browser's cache.

If you want to redirect you'll need to use javascript since it'll be an ajax
request.

Cheers,
Lance.

2008/6/2 Lance Java <la...@googlemail.com>:

> Not really possible I'm sorry, when a user hits the back button, the page
> they are viewing is in their browser cache (ie not a serverside hit).
> Probably the best solution is to set a flag (persistant property or in the
> db) on first form submit then fail any subsequent submits by redirecting to
> an error page.
>
> Cheers,
> Lance.
>
> 2008/6/2 James Sherwood <js...@rgisolutions.com>:
>
> Hello,
>>
>> I was told I posted this in the wrong spot so I am sending to the list
>> again and hopefully it goes in the right spot..
>>
>> I am trying to stop users from submitting a form and then pressing the
>> back button and seeing the form again.  I would like to either redirect them
>> somehow or just show them a session expired.
>>
>> Any ideas?
>>
>> Thanks,
>> --James
>
>
>

Re: Repost: T3: Stop back button view of a form

Posted by Lance Java <la...@googlemail.com>.
Not really possible I'm sorry, when a user hits the back button, the page
they are viewing is in their browser cache (ie not a serverside hit).
Probably the best solution is to set a flag (persistant property or in the
db) on first form submit then fail any subsequent submits by redirecting to
an error page.

Cheers,
Lance.

2008/6/2 James Sherwood <js...@rgisolutions.com>:

> Hello,
>
> I was told I posted this in the wrong spot so I am sending to the list
> again and hopefully it goes in the right spot..
>
> I am trying to stop users from submitting a form and then pressing the back
> button and seeing the form again.  I would like to either redirect them
> somehow or just show them a session expired.
>
> Any ideas?
>
> Thanks,
> --James