Re: z3c.form: handling of interface invariants

Michael Howitz <[email protected]> Tue, 9 Oct 2007 08:43:01 +0200
Newsgroups gmane.comp.web.zope.zope3
Message-ID <[email protected]>
Am 27.09.2007 um 10:37 schrieb Michael Howitz:
> After thinking it over we decided to implement the first approach =20
> (change z3c.form.validator.Data to read the value of a field =20
> missing in he form on the object).
>
> We put our changes into the branch gocept-invariants.
>
> The reasons to change our decision where the following:
>
> - the second approach (using save-points) requires save-point =20
> support on the back-end and breaks without this support
>
> - using save-points would require to change the structure of =20
> z3c.form: till now the complete validation is done by =20
> z3c.form.field.FieldWidgets, using save-points validation gets =20
> split up into validation of field contents in FieldWidgets and =20
> validation of the invariants.
>   The validation of the invariants has to be implemented at least =20
> twice: in AddForm and EditForm because saving form values is done =20
> completely different in these classes. So someone creating a direct =20=

> subclass of z3c.form.form.Form has to do things again or we need =20
> additional changes in the structure.
>
> Any thoughts?

As no-one had any further thoughts, I'll merge the branch into the =20
trunk within the next few days.

--=20
Yours sincerely,
Michael Howitz

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