Thanks for the advice, After reading you email I made some changes to the preaction and postaction methods and that did the trick.
Jose -----Original Message----- From: Aaron Held [mailto:aaron@;MetroNY.com] Sent: Thursday, October 31, 2002 11:39 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [Webware-discuss] body tag and Posts The action function OVERRIDES self.writeHTML(), so your entire page/layout is not called. the only output of the action in your case will be funct You may need to set some variable and then call self.writeHTML() def func1(self, trans): self.msg='funct was called' self.writeHTML() def writeContent(self): if self.msg: self.writeln('<h1>%s</h1>'%self.msg) self.msg=None # clear msg, or it will live for the next call of this servlet. -Aaron ps. Becuase I never do anything the 'right' way - I prepare the page in preAction, and then all of my action calls just call self.writeHTML [EMAIL PROTECTED] wrote: > Hi all I have a problem / question > > when pages are generated via an _action_ the <body> tags are not > written > correctly. However the same content written without using the _action_ > method will write the <body> tages. For example (since this probably > does not make sense) > > if my file is functest.py > > from WebKit.Page import Page > class functest(Page): > def writeContent(self): > if self.request().hasField('func2'): > self.func1(1) > else: > self.write('') > > def func1(self, trans): > self.write('funct') > > def actions(self): > return Page.actions(self) + ['func1'] > > Then > functest.py?_action_=funct1 Will not have a body tag > > where as > > functest.py?func2=1 will print the body tag > > > How should I handel this to print the page correctly? > BTW I am using webware 0.7 apache 2.0.43 wkcgi.exe and python 2.2.1 on > winxppro > > thanks > > Jose > ------------------------------------------------------- This sf.net > email is sponsored by: Influence the future of Java(TM) technology. Join > the Java Community Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en > _______________________________________________ Webware-discuss mailing > list [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/webware-discuss ------------------------------------------------------- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
