[Seaside] callbacks of disabled submit buttons

Sebastian Sastre ssastre at seaswork.com
Fri Aug 21 20:10:18 UTC 2009


Ok, here I go.. 

for the record:
f* buttons won't work as supossed with readonly. Is nothing to do with Seaside.
They should, but they won't. Don't ask why.

So.. a way I've found to (almost) achieve this feature (without using ajax) is
to let the button enabled and observe the submit event. If the submit event was
already received (you need to store that state at DOM) then react stopping it to
prevent the extra POST's.
peace & love
sebastian

> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org 
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre 
> de Sebastian Sastre
> Enviado el: Friday, August 21, 2009 16:32
> Para: 'Seaside - general discussion'
> Asunto: RE: [Seaside] callbacks of disabled submit buttons
> 
> > make it idempotent
> > > until the result is received preventing silly server load.
> > 
> > You are looking for read-only, I guess. The difference between
> > disabled and read-only is described a bit above: 
> http://bit.ly/4xG24Y.
> > 
> That sounds about right. Figuring out how...
> 
> 
> > > Another example is a "confirm purchase" kind of button 
> > where a capture of money
> > > is made.
> > 
> > I wouldn't count on the we client, to make it secure you *have to*
> > prevent a double confirmation on the server, for example by checking
> > in your model or using #isolate:
> > 
> > Cheers,
> > Lukas
> 
> sure. What I mean is both. Actually is decided by the server 
> but as an extra
> measure I want additionally to prevent UI side excess of clicks.
> 
> Never bad to remember it anyway.
> 
> thanks for the pointer
> sebastian
> 
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list