Hi, Alberto,
On 8/24/06, Alberto Valverde <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I'm having a problem with Tabber widget. I need to put a TableForm
> > inside one of the tabs, and inside TableForm there's an
> > AutoCompleteField and a CalendarDatePicker (both with dynamic
> > functions).
> > Tabber was raising "mismatch tag" error when I inserted TableForm's
> > render() on Tabber template. I solved it with BeautifulSoup's
> > prettify(), but now the dynamic functions (the search function from
> > the AutoCompleteField and the Calendar applet from the
> > CalendarDatePicker) aren't working anymore.
> > Somebody has any idea about how to solve it, or knows if it's
> > impossible for some reason?
>
> Maybe you need to use widget.display() instead of widget.render() (If it's
> not a typo in your email). Some sample code would help if that's not the
> issue.
It was not a typo. I used widget.render() because widget.display()
doesn't return raw HTML code, but an object.
I'm still trying, but here is the code the way it is (don't mind
the variable names - I'm not native English speaker). Thanks a lot for
helping:
def reserva(self):
formSimples = widgets.TableForm(name="FormReserva",
fields = ReservaForm(),
action = "runReserva",
submit_text = "Efetua reserva",
label = "Reserva Simples")
template="""<div class="tabber"><div
class="tabbertab"><h2>Reserva Simples</h2>%s</div><div
class="tabbertab"><h2>Tab 2</h2></div><div class="tabbertab"><h2>Tab
3</h2><input type="submit" /></div></div>""" % formSimples.render()
from BeautifulSoup import BeautifulSoup
template=BeautifulSoup(template).prettify()
form = widgets.Tabber(label="lala", template=template)
return dict(form=form)
My template has just a ${form()} inside a div...
Any help will be very useful. :-)
Sincerely,
--
-><-
Fernando Aires
[EMAIL PROTECTED]
"Em tudo Amar e Servir"
-><-
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---