Adam Jones escribi�: > There are a couple of ways that I know of for you to approach this. By > default all the tabber widget does is make sure the appropriate CSS and > Javascript files are loaded with the page. So what you could do is: > > Initialize the tabber widget (should be done outside of the controller > classes in controllers.py, I usually put it right after all the import > statements) > > from turbogears import widgets > tabber_widget = widgets.Tabber() > > Then you can put 'tabber_widget' into the dict returned by your > controllers and leave the tabber code in the kid file. It *should* make > sure everything works from there. >
Thanks for you help, but my code not work... the page is blank. The tabber in tg-admin toolbox work! I have the next code: ==== Controllers ==== from turbogears.widgets import * myTabber = Tabber() @tg.expose(template="agua.templates.usuarios.tabbertest") def tabberTest(self): return dict(tabber = myTabber) ==== tabbertest.kid ==== <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'../master.kid'"> <head> <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> </head> <div class="tabber"> <div class="tabbertab"><h2>Tab1</h2>work1</div> <div class="tabbertab"><h2>Tab2</h2>work2</div> </div> </html> the html render is: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD><META CONTENT="text/html; charset=utf-8" HTTP-EQUIV="Content-Type"> <LINK MEDIA="screen" HREF="/tg_widgets/turbogears.widgets/tabber/tabber.css" TYPE="text/css" REL="stylesheet"> <SCRIPT TYPE="text/javascript">document.write('<style type="text/css">.tabber{display:none;}<\/style>');</SCRIPT><SCRIPT SRC="/tg_widgets/turbogears/js/MochiKit.js" TYPE="text/javascript"></SCRIPT> <META CONTENT="Proyecto GeInE" NAME="Title"> <LINK MEDIA="screen" HREF="/static/css/press/style.css" TYPE="text/css" REL="stylesheet"> </HEAD> <DIV CLASS="tabber"> <DIV CLASS="tabbertab"><H2>Tab1</H2>work1</DIV> <DIV CLASS="tabbertab"><H2>Tab2</H2>work2</DIV> </DIV> </HTML> Have anyone any pointers to solve the problem? > -Adam Thanks for the answer... > > > > > -- maram http://maram.com.ar - http://geine.maram.com.ar Ubuntu Linux User - TurboGears User --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---