[Erp5-dev] Dialog forms' submit button malfunction
Jérôme Perrin
jerome at nexedi.com
Sat Mar 3 14:56:08 CET 2007
Le Samedi 3 Mars 2007 09:27, Jacek Medrzycki a écrit :
> I'm not sure if it can easily be done in ERP5, but years ago I solved
> similar problem in Tomcat-powered application by adding a unique token
> (generated from the system time) to each request that should be
> prevented from double execution. Last token was remembered on the
> server, and when a request with the same token came, server discarded
> such a request. It works regardless ot the browser settings.
Yes, this is a good way, but with ZEO it's more complicated, because the
request for dialog initiated by a node can be later sent to another node (a
good load balancer usually prevent this, but it can happen), so this
information have to be distributed. In our case, this is overkill, because
processing the request twice usually has no effect.
> > If it's
> > too annoying, I'm ok to revert untill we have a clean solution, and keep
> > this change locally on projects which requires it.
>
> I think it shouldn't be reverted, as preventing user from double
> execution of the request is very important. However, sometimes it makes
> no sense, for instance in raport dialog, where user could have a chance
> to re-launch the report with different settings (this was the case that
> made Mikolaj post his question).
I agree, and already made a quick workaround for this (r11776)
> The nicest thing would be the ability to enable or disable such
> functionality per dialog.
This was my conclusion too.
Jérome
More information about the Erp5-dev
mailing list