[Seaside] Changing WAFormDecoration to use a callback instead of passing in a list of symbols (for buttons)

Yar Hwee Boon hboon at motionobj.com
Mon Feb 7 14:43:21 CET 2005


I have a dialog class that indirectly inherits from WAFormDialog. 
Depending in where this dialog is used, I would like it to have 
different buttons, eg. #save, #saveAndCreateAnother, #cancel instead of 
#save and #cancel. Looking at how WAFormDecoration is used right now 
(in the Seaside base, its only used in WAFormDialog), would it be more 
flexible and not more complicated to change how buttons are specified 
from passing in a list of symbols to using a callback, so that we have:

WAFormDialog>>addForm
	form := WAFormDecoration new buttonsCallbackSymbol: #buttons.  "or 
just WAFormDecoration new"
	self addDecoration: form

WAFormDecoration>>buttons
	^ owner perform: buttonsCallbackSymbol

--
HweeBoon
MotionObj
(65) 6764-9774



More information about the Seaside mailing list