Aaron Bostick wrote:
> Jose,
>
> Have you tried just a simple widget.display() in the kid template within
> the tabber div?  I am doing this now and it seems to work fine.

Yes, that should work. Your template would look something like this:

<div class="tabber">
    <div class="tabbertab"><h2>atitle</h2>
        ${mywidget.display(data)}
    </div>
    ...
</div>

>
> Just create your widget in the controller and pass it to the template
> like normal as part of the return dict()...
>
> jose wrote:
> > Hi all,
> > I would like to insert a form into a Tabber widget.
> > Using the code above I can insert it successful,
> > but I don't know how to set the editForm.fields.name with data.
> > Using editForm.render() the widgets are displyed empty
> > I tried editForm.display() but it doesn't work.
> > Is there a demo about how to use it?
> > -----------------------------------------------------------------------------------
> > editForm = widgets.TableForm(
> >     fields = [
> >         widgets.HiddenField(name='id'),
> >         widgets.TextField(name='cliente',label='codice utente'),
> >         widgets.SubmitButton(name='Save',label='',default='salva'),
> >         ] )
> >
> > class Controller:
> >     @expose(template="kid:sicer.templates.config.edit")
> >     def index(self, tg_errors=None, **data):
> >         qry = session.query(Config)
> >         context = qry.get_by(id=1)
> >
> >         template="""
> >           <div class="tabber">
> >             <div class="tabbertab"><h2>Amministratore</h2>   </div>
> >             <div class="tabbertab"><h2>Anagrafica</h2>     </div>
> >             <div class="tabbertab"><h2>Fatturazione</h2>
> >             %s </div>
> >           </div>
> >           """ % editForm.render()
> >         tabForm = widgets.Tabber(template=template)
> >         return dict(tabForm=tabForm, context=context)
> > --------------------------
> > jo
> >                               
> > 
> > 
> > > 
> Regards,
> Aaron


--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to