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
