Jose Soares schrieb:
> Hi all,
>
> I would like to know how to change a widget field on fly.
>
> this is my definition:
>
> editFormFat = DataGrid(
> fields=[widgets.Label('valore')]
>
> in my sub index I put this:
>
> editFormFat.fields[0]= widgets.HiddenField('valore')
>
>
>
> I expected that editFormFat display with last change but.
> Is there a way to do this?
Yes. Create a new widget each and every time. I'm not sure about the
performance impact though, but I don't think it should be too hard.
Or - if you know that there are only so many different widgets, create a
instance for each different version, and decide on which one to return
in the controller method.
Don't mess with one widget instance!!!! It is shared amongst the
different requests, and you get race conditions then!
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
-~----------~----~----~----~------~----~------~--~---