Would perhaps a state flag be apropriate that tells the object *NOT* to talk to the html output system?
-- Shayne O'Neill http://perth.indymedia.org I know how hard it is for you to put food on your family." ----George W. Bush On Mon, 19 Apr 2004, Ian Bicking wrote: > I haven't been using actions very much up until now, but I used them in > the Wiki and found the method layout to be suboptimal. I think other > people have had the same experience. > > 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 > ------------------------------------------------------- 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
