>
> 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)}
Here we have the problem. params is a passed dictionary, _not_ a dictionary
passed via ** as arguments!!!
I'm not exactly sure which magic makes 2) work, but I'm pretty sure my
solution works if you do it like this:
${form(params=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)
Via the path - by giving a list as the paramter value, and the options as dict
inside it. Along these lines:
dict(module=dict(fractions=[name=dict(options=foopt)]))
In the end, it's simple: you have to recreate the exact tree the widgets
represent as a dictionary/list-thingy.
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
-~----------~----~----~----~------~----~------~--~---