On Jan 25, 2007, at 6:17 PM, Rupert Redington wrote:
>
> Hi All,
>
> So... I've got a TableForm which has been supplied with a
> WidgetsList at
> instantiation. I need to pass some data to one of the widgets at the
> point when I call the form's display method in my template.
>
> I can pass many exciting parameters directly to the form but can
> find no
> way to address its member widgets.
>
> I found a hint "form.display(value, **{'.address':{'repetitions':3}})"
> at http://docs.turbogears.org/1.0/RoughDocs/WidgetsOverview, but that
> approach gets me an error I don't understand (though the syntax looks
> very odd) when I use
>
> form
> py:replace="edit_form.display(twitch,**{'.tags':{'for_item':1}})"></
> form
>
> Traceback below...
Hmmm, it's true that all ToscaWidgets references in the docs are
counter-productive... Just removed that chunk of code from the docs.
That syntax only works in TW, for TG widgets you need:
edit_form.display(twich, for_item={'tags':1})
(that is a direct translation of the code you mentioned, I have no
idea what "for_item" si supposed to do...)
HTH,
Alberto
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---