On 3/20/07, jose <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I'm trying to change the options of a SingleSelectField used in a
> RepeatingFormField ...
>
> class AddPrest(widgets.WidgetsList):
> ope = widgets.SingleSelectField(name='operat',options=[],
> validator=Int(strip=True))
>
> class AddFields(widgets.WidgetsList):
> casl =
> widgets.SingleSelectField(name='casl',options=opt_cli,validator=UnicodeString(not_empty=True,
> strip=True),
> attrs=dict(onchange='form.submit()'))
> prest =
> RepeatingFormField(name='prest',fields=AddPrest(),repetitions=10)
>
> addForm = TableForm(fields=AddFields(), action='save_many')
>
> when I try to change value options as:
> addForm.fields[0].fields[0].options = my_list
>
> I have this error:
> *exceptions.ValueError: ('It is not threadsafe to modify widgets in a
> request')
>
> is there a way to do that?
>
why can't you set everything before, this restriction is explicit so
you don't shot yourself in the foot.
could you give more details?
> thank you,
> jo
>
> *
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---