can you explain following in more depth?
"The view contains a menu, when the visitor clicks one of the menu items
one of the other functions should be exposed. The problem is passing on
the id."
my guess is you would like to have following:
in controlller function:
int(request.args[-1])
it gives you id from the view.
julius
On Po, 2009-01-26 at 12:38 -0800, annet wrote:
> In my application I have a controller with a number of functions. The
> first function gets an id from request.vars and uses it as a parameter
> in several queries, the result sets are returned in dictionaries. When
> I expose the function, the view consists of <div></div> elements in
> which the contents of the dictionaries are displayed. The view
> contains a menu, when the visitor clicks one of the menu items one of
> the other functions should be exposed. The problem is passing on the
> id.
>
> I tried adding a session variable to the controller outside the
> functions:
>
> session.idvariable
>
>
> And then in the first function give the idvariable a value:
>
> session.idvariable=request.vars.id
>
> (request.vars.id works when used as a parameter, so that cannot be the
> problem)
>
>
> And in the other functions retrieve it:
>
> id=session.idvariable
>
>
> But that doesn't work. Does one of you know why?
>
>
> Best regards,
>
> Annet
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---