On Monday 29 January 2007 04:43, shday wrote: > Hi, > > I have a SingleSelectField in a WidgetsList that goes into a > TableForm. The 'options' parameter for this field is currently a > callable that querys a database. I want to be able to pass parameters > to the callable that will control the option list that is returned. I > can't figure out how to do it (other than when the WidgetsList is > defined). > > see http://paste.turbogears.org/paste/931
There are several solutions. The easy way: just create your form widget every time the page loads. The not-so-easy way (untested!!!): subclass SingleSelectField, override the update_params method. In there, I guess you should be able to alter the options, based on whatever parameters you have. 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 -~----------~----~----~----~------~----~------~--~---

