Hi Jason, now if you need to absolutely access the request values you can force a Form to do so by setting it's can_access_request=True attribute after you have created the instance.
Hope this helps, anyway I'm still convinced that the solution you're using for you problem is not the right one. ;-) Ciao Michele Jason Chu wrote: > We're working with our own existing code base with a bunch of custom > widget changes, so hopefully this still applies. > > I have a problem with form validation. We create custom forms all the > time, because we want to have a better layout than the TableForm or > ListForm. > > One such form contains something that extends SelectionField. This widget > needs its list of options when it's instantiated (it's possible to do it > later, but you'd have to pass it its own validator...). The list of > options for the widget is taken from the current user, so we have to > generate the form at request time, not before. To use this form for > validation, we pass it to the validate decorator as a class, not an > instance. > > Some recent changes went in, including the can_access_request (base.py) > function that looks at the widget's path and sees if the widgets above it > are the same as the validated_form. In our case, it is not. > > I narrowed it down to the controllers.py file, line 108. If the validate > decorator is passed something that is callable and not a widget, it will > instatiate it. The problem is that it passes 'self' as the first > parameter. The first parameter to a form is its name, so the > validated_form gets a name of my controller instance. > > I'm pretty lost at this point. I don't know which direction the widgets > are supposed to be going so that we can continue to steer ourselves that > way. > > Thoughts? > > Jason > > -- > If you understand, things are just as they are. If you do not understand, > things are just as they are. > > --=_mercury-10819-1142390518-0001-2 > Content-Type: application/pgp-signature > Content-Transfer-Encoding: base64 > X-Google-AttachSize: 192 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

