To do what you want I think you'd need to write a validator which
converts the botsgrid value back to a list of dicts.  Without a
validator the parameters will always be unicode objects.  TG/CP
doesn't try to guess the types.

Cheers
CM

On Apr 24, 1:11 pm, eppye <[EMAIL PROTECTED]> wrote:
> I use a grid/table in a form.
> the user can select rows, and use different submit buttons
> In controller function 'recievereports' 2 arguments are recieved:
> - 'menu': the submitbutton used
> -  'botsgrid': a list of dictonaries; each dictionary is a table row
> Controller function 'recievereports'  redirects, dependent upon the
> submit button used.
> But in the controller function to which is redirected ('showtraces')
> the argument I pass ('botsgrid')  is unicode, not a list of
> dictionaries.
>
>     @turbogears.expose()
>     @turbogears.validate(form=botsforms.reportgridform)
>     def recievereports(self,menu=None,botsgrid=None):
>         if menu['showtraces']:
>             raise turbogears.redirect('/showtraces',botsgrid=botsgrid)
>         elif menu['showprocesses']:
>             raise turbogears.redirect('/
> showprocesses',botsgrid=botsgrid)
>
>     @turbogears.expose(template="master")
>     def showtraces(self,botsgrid=None):
>         print type(botsgrid),botsgrid
>
> How can I pass this argument as a list of dictionaries?
>
> best regards, Henk-jan


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