Re: [Zope-CMF] Re: CMF and Five views: hooking up "POST"
yuppie wrote at 2005-10-17 15:24 +0200: > ... >I don't think so: > >1.) If you start rendering the default view before the controller has >finished you need extra code to abort the rendering if necessary. E.g. a >tal:condition that wraps the whole template. > >2.) A cleaner separation of controller calls and view rendering makes >the code simpler and therefore easier to write and maintain. > >3.) Rendering useless views wastes resources. "CMFFormController" does a nice job in this respect. -- Dieter ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: CMF and Five views: hooking up "POST"
The standard Zope3-ish way is to have a m,ethod called Update() which you call every time the views template is displayed. This method can prepare all the data to be displayed, as well as handle any form postings. Instead of checking on POST I usually check on the button-presses, but of course if you don't want GET-forms to work, checking for POST is the right thing to do. ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests