[ZPT] functional methods.

Phil Harris phil.harris@zope.co.uk
Fri, 31 Aug 2001 10:35:47 +0100


All,

Since one of the goals of the ZPT project is to faciliate the separation of
presentational and functional layers, I have a small question.

What is the recommended way of calling a method that has no return value,
and has no impact on the presentation of the page in question?

For example, page1.html is a form that lists objects with a check box to
mark for some action.

Page 2.html then takes those selected and for example deletes them.

Assuming that when successful there is no return value (other than the
default Python return of None). How would this be called to ensure that it
has no side-effects in the Page Template itself.

Am I making myself clear? Not sure, but I hope you'll get my train of
thought.

The only way I can see of doing it is something like,

<span tal:omit-tag="" tal:condition="python: here/PSDelete"/>

This should leave no trace in the output, but the actions should be taken.
Am I right/

Thanks for listening to my drivel.

Phil