iain duncan wrote:
> There seem to be quite a number of ways to do this stuff.
> Concerning the above:
>
> - where and how do you perform a render() on your widget? In the body
> of the controller method that gets hit by the XMLHttpRequest?
Yes, in the body of the controller. You can look at the WhatWhat source
code for an example, but basically the "render()" method is the same as
the "display()" method on widgets, except it is meant to be called from
outside the context of a template file, and returns an ElementTree node
with the genereated widget's HTML fragment.
> - do you return the html fragment raw? ie @expose() if not, how is it
> done?
Like so:
@expose(fragment=True)
def my_controller_method(self):
return my_widget.render(arg1='one', arg2='two')
Easy stuff!
--
Jonathan LaCour
http://cleverdevil.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---