[Seaside] render methods vs non-render methods in components -
Randal L. Schwartz
merlyn at stonehenge.com
Mon Mar 31 15:46:57 UTC 2008
Briefly, call:/answer: should *not* be used during a render, but only
during a callback. Render methods should all take an "html" parameter.
Yet a typical WAComponent of mine will have methods of both types.
And a WATask will have *no* render methods.
I'm wondering if there's a convention for me to know whether I'm in a render
method (or something called from that) or not. Do the experienced seasiders
follow the convention that all render methods look like:
But what about the other methods? How would you know if another method
is being called from a render method or from a callback, or maybe both?
In other words, is there a convention for me to know if I can call:
aValue ifNil: [aValue := self request: 'How many times?'].
safely in a given method of a component?
Should I put all callback support into a separate protocol category?
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
More information about the seaside