[Zope3-dev] Add flexibility to zope.formlib.form.EditFormBase

Michael Howitz mh at gocept.com
Fri May 4 03:26:17 EDT 2007


Hi,

I'm using zope.formlib.form.EditFormBase and want to normalize data  
before saving it.
Saving is done by the applyChanges function which is called from  
handle_edit_action.
The problem is that handle_edit_action is an action, so I can't  
easily subclass and do a super call to handle_edit_action.
If I add my own handle_edit_action I have to copy-paste the code from  
formlib because applyChanges is a function, not a method on the class.

My solution would be to add an applyChanges method to  
zope.formlib.form.EditFormBase which calls the applyChanges function.
Any objections?

Yours sincerely,
Michael Howitz

gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon: +49 345 12298898 · fax: +49 345 12298891




More information about the Zope3-dev mailing list