On Dec 13, 2006, at 8:45 PM, Steve Bergman wrote:
>
> class Root(controllers.RootController):
>     @expose(template="ssf.templates.welcome")
>     @validate(form=form)
>     @error_handler()
>     def browse(self,tg_errors=None, **kw):
>         return dict(form=form,
>                     values=dict(sort_crit='id')
>                     )

Probably the form is failing validation so when it's "redisplayed"  
the widgets will pick their values from the request params overriding  
any value you send it. The simple solution will be to split the  
method in two like show in the examples at the docs: one to show the  
form (or redisplay it) and another to validate it.

There was a thread about a week ago which showed a recipe to handle  
validation and display in the same method gracefully (but haven't gor  
the time ATM to look it up, sorry).

Alberto

--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to