[Seaside] cancel button in canvas

Avi Bryant avi.bryant at gmail.com
Wed Apr 19 17:59:26 UTC 2006

On Apr 19, 2006, at 6:19 AM, Lukas Renggli wrote:

>> i am looking for an equivalent of cancelButtonWithAction:... in  
>> canvas.
>> Do I use a submitButton and register a callback by hand?
> I guess the reason this is missing, is that nobody ever needed it. In
> my opinion, the need of a cancel-callback is a sign of a code-smell
> ;-)

Why?  Assuming that you want the user experience to be a cancel  
button rather than a cancel link, I only see three options:

- split the cancel button into its own form.  Not always possible or  
- add a layer of indirection to all of the input callbacks (eg,  
capture the values locally and then apply them to the model only on a  
save callback)
- have a specialized cancel callback

The third usually leads to the least code and is the easiest to  
understand overall, IMO.  What's the smell?


More information about the Seaside mailing list