JSSource for JumpMenu widget not rendering

3 views
Skip to first unread message

Brian Cole

unread,
Jul 25, 2007, 11:04:49 AM7/25/07
to turbo...@googlegroups.com
Hi All,

The JSSource defined inline in the JumpMenu widget is not rendering
when the display method is called within a kid template. I've simply
copy and pasted the exact JSSource over to another widget in the same
page and then it renders fine.

I don't know what to do before I start digging into TurboGears
internals. Any suggestions to debug this?

FYI, Using TurboGears 1.0.3 for Python 2.4 on Ubuntu Linux (though the
production server will be CentOS)

Thanks,
Brian

Christopher Arndt

unread,
Jul 26, 2007, 12:29:49 PM7/26/07
to turbo...@googlegroups.com
Brian Cole schrieb:

> The JSSource defined inline in the JumpMenu widget is not rendering
> when the display method is called within a kid template. I've simply
> copy and pasted the exact JSSource over to another widget in the same
> page and then it renders fine.

You need to return the widget in the dict from your controller as one of
the values, e.g.

@expose(...)
def mypage(self):
...
return dict(jumpmenu=widgets.JumpMenu(...), ...)

Only then the JS/CSS inclusion will work. Also, make sure that your
templates derive from 'sitetemple.kid'. (usually through the standard
'master.kid'


HTH, Chris

Reply all
Reply to author
Forward
0 new messages