I asked before but didn't get anywhere, probably because the question was
too stupid. Let me try again :

I have a Cheetah template like :

"<html><body>$content</body></html>"

my (simplified) writeHTML looks like :

class myPage(Page):
        def writeHTML(self):
            template = Template("<html><body>$content</body></html>")
                template.content = self.getContent()
                self.write(template)
        def getContent(self):
                return "override me"

and I override getContent() in sub-classes to return the content. 

I want to plug FunFormKit into this :

    def __init__(self):
        FormServlet.__init__(self, None, [formDef])
        myPage.__init__(self)

    def getContent(self):
          return self.renderableForm().htFormTable(bgcolor="#ddddff")
                
But this isn't it. I don't want FormServlet to override any method to
writeln() itself out (hence None), I want to defer this to getContent() to
pull out the funformKit generated HTML. 

The best I can get out of getContent is a TraceBack :

  File "FunFormKit\Form.py", line 110, in renderableForm
    if self._erroneousRequest:
AttributeError: myPage instance has no attribute '_erroneousRequest'

Maybe my approach is all wrong. I'd appreciate any clues.

- Ian Sparks.

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to