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.
>   
Sorry if I am still confused.
I don't get it. And, your solution doesn't work.

Back to basics:

-- controller --
myform = Form(fields=[SingleSelectField('module',options=[('','')])])

foopt = [('foo','foo')]

1)   params = {'module':{'options':foopt}}
2)   params = {'options':{'module':foopt}}

return dict(form,params)


--template--
${form(**params)}


Now, given that the line that works for me is 2), it's not clear to me
why I should expect 1) to work for compound widgets.

I'm looking at retrieve_params_by_path, tried some waving of
member_widget_params (not eve used by repeating widget, I guess), and
still I cannot reach the inner widgets...

It seems like I can also reference a particular repetition and specify
different option lists for each one (though how escapes me)


tnx


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