On Friday 16 February 2007 13:56, Marco Mariani wrote:
> Diez B. Roggisch wrote:
> >> fractions = wid.RepeatingFieldSet('fractions',
> >> fields = [
> >>
> >> wid.SingleSelectField('module',options=[('','')]),
> >>
> >> wid.TextField('amount',validator=val.Money),
> >> ]
> >> )
> >
> > You've got things turned around here.
> >
> > It should work with
> >
> > params['module'] = {'options' : [('foo', 'foo')]}
>
> It would work if module was not nested inside "fractions" which is a
> RepeatingFieldSet.
>
> This was not clear from the botched indenting above, sorry
Yet still you can't set the options-parameter from top-above.
If you have nested widgets that you want to pass parameters to, you need to go
down the path to the respective widget, and then give the params.
params['fractions']['module'] = {'options' : [('foo', 'bar')]}
What you have ist the other way round, you first specify options, then you try
to decent to the widget.
Diez
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---