turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil Stevens" <neil.stev...@firstlightassociates.co.uk>
Subject Re: Peventing double submission
Date Sun, 02 Feb 2003 21:42:34 GMT
At the end of every action i always do a redirect if successful :-

TemplateLink tl = new TemplateLink( rd );
tl.setPage( nextPage );
rd.setRedirectURI( tl.getURI() );
rd.setStatusCode( 302 );

This causes the next page to be a 'fresh' page, not the reult of a post.
refresh works fine then.

if not successful, the action just falls thro, and the same page is
displayed again - intake then shows the errors.
(My forms always setPage to itself)

N
----- Original Message -----
From: "Henrik Westergaard Hansen" <spam@procesgruppen.dk>
To: <turbine-user@jakarta.apache.org>
Sent: Sunday, February 02, 2003 7:47 PM
Subject: Peventing double submission


> Hello
> I am quite new to Velocity and Turbine. So sorry for this "basic"
question.
> My problem is that when I have triggered an action once, the action is
> triggered again when I press "refresh". How do I detect, in Turbine I
> guess, that it is a refresh?
>
> If I can detect the refresh I want to prevent the action from being
> executed again.
>
> Please advice!
>
> Best regards Henrik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>


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


Mime
View raw message