You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Olivier Gourment <og...@yahoo.com> on 2003/01/24 14:16:56 UTC

double-click protection and double-update problem

Hi,

I was not able to search the archive...

I need to know if Struts supports the following - and if the support is
out-of-the-box or if any customization or convention is to be used:

1) Double-Click Protection: when a user clicks twice on the same
button, the associated action is not executed twice...
2) Double-Update Problem: when a user hits the Back button of his
browser, the refresh of the page does not execute the transaction
associated to the page twice.

Thanks,


      Olivier


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: double-click protection and double-update problem

Posted by Gemes Tibor <ti...@i-trade.hu>.
2003-01-24, p keltezéssel Olivier Gourment ezt írta:

> I am not using Struts yet, so I am not familiar with the Struts
> specific classes and tags, and I would like to be able to recommend it
> to my customer.

You can create a token with saveToken(request); use this in yor
form-populating action.

And check for it later in the save acion with sg like:

if (!isTokenValid(request)) { 
 ActionErrors errors = new ActionErrors(); 
 errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.token"));
 saveErrors(request,errors);
 return new ActionForward(mapping.getInput()); 
}

This works automagically.

Hth,

Tib


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: double-click protection and double-update problem

Posted by Olivier Gourment <og...@yahoo.com>.
Tib,

I am not using Struts yet, so I am not familiar with the Struts
specific classes and tags, and I would like to be able to recommend it
to my customer.
Could you elaborate a little or point me to useful links? In
particular, would you have an idea of how much development this
involves?
Thanks a lot,

    Olivier


--- Gemes Tibor <ti...@i-trade.hu> wrote:
> 2003. janu�r 24. 14:16 d�tummal Olivier Gourment ezt �rtad:
> > Hi,
> >
> > I was not able to search the archive...
> >
> 
> > 1) Double-Click Protection: when a user clicks twice on the same
> > button, the associated action is not executed twice...
> > 2) Double-Update Problem: when a user hits the Back button of his
> > browser, the refresh of the page does not execute the transaction
> > associated to the page twice.
> 
> This is what the tokens are good for.
> 
> Tib
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: double-click protection and double-update problem

Posted by Gemes Tibor <ti...@i-trade.hu>.
2003. január 24. 14:16 dátummal Olivier Gourment ezt írtad:
> Hi,
>
> I was not able to search the archive...
>

> 1) Double-Click Protection: when a user clicks twice on the same
> button, the associated action is not executed twice...
> 2) Double-Update Problem: when a user hits the Back button of his
> browser, the refresh of the page does not execute the transaction
> associated to the page twice.

This is what the tokens are good for.

Tib

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>