[Zope-CMF] Re: [CMF-checkins] renamings
yuppie
y.2004_ at wcm-solutions.de
Tue Jul 13 15:03:56 EDT 2004
Dieter Maurer wrote:
> Looking again at CMFDefault, I had to recognize that it is
> extremely long that I used it (and I used it only for a very short time).
> The way, I thought CMFDefault would work is not how it does.
>
> Thus, lets step back a bit:
>
> "CMFFormController" follows the paradigme: the HTML action target
> of the form is the form itself -- always.
>
> "CMFFormController" takes care of logic (by means of modular
> validation scripts) and navigation (maybe supported by further
> scripts).
>
> This behaviour is easily emulatated by the form submitting
> to itself and calling an action script at its top which in
> turn emulates what "CMFFormController" would do.
>
> That's the way I (and when I understood it right, Florent) favour.
>
> I thought, that this was already the way, CMFDefault works now.
> But that apparently was wrong. The renamings you proposed
> may not be a step away form "CMFFormController", just not
> a way towards it.
Don't know where you looked: On HEAD forms like document_edit_form or
folder_contents *are* submitted to themselves. If a button is selected,
the script calls a sequence of validators, controller and redirect.
<example>
if change and \
context.validateTextFile(**form) and \
context.validateHTML(**form) and \
context.document_edit_control(**form) and \
context.setRedirect(context, 'object/edit'):
return
</example>
The renaming just changed in which order script and template are called.
Cheers, Yuppie
More information about the Zope-CMF
mailing list