Anyway, I'll describe what I did and see what people's reactions are.
First, preAction and postAction do nothing.
Second, _respond invokes writeHTML always, not just when no action was found.
Third, defaultAction sets self.view = 'writeContent'; other actions set it to other values.
In writeBodyParts, I do:
def writeBodyParts(self):
getattr(self, self.view)()And actually if view is None, then writeHTML doesn't do anything (which is what I set when writing non-HTML output).
Then each action does its thing, kind of like awake (but in addition to awake, which is always called) and then chooses its "view". On a form submittal, for instance, it may choose a view where it shows success, or if there were errors it may show the original form view.
Often in title() I code in some different values depending on the view, there might be a better way to do that (e.g., make the title a function attribute of the view method). But anyway, at least it's possible to change some of those non-content parts of the page depending on the action.
I'm not sure how this fits into what people are doing with _action_ right now. I played around with adding this pattern to Component.CPage, but I want that to be backward compatible so maybe that won't work.
Ian
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
