Yes,

#in controller
def myaction():
     return dict(piechartcomponentdata = [2,3,4,7,8,9])

#in view
{{if 'piechartcomponentdata' in globals():}}
   {{=piechartcomponentdata}}
{{pass}}

Massimo



On Jul 27, 3:21 pm, Dan <[email protected]> wrote:
> sounds like you could use the response.vars dictionary to pass the
> information you need. For instance, your controller could have this
> line:
>
> response.vars.piechartcomponentdata = [2,3,4,7,8,9]
>
> and then your view could have this:
> {{if piechartcomponentdata in response.vars:}}
>   {{... draw your component with the data ...}}
> {{pass}}
>
> On Jul 27, 1:06 pm, jcorbett <[email protected]> wrote:
>
> > Is it possible to pass parameters to a view, as if it were a
> > function?  Basically I want to create components in my views, reusable
> > parts, but may depend on on a variable for the data it renders.  Any
> > ideas on how to do this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to