On Saturday, April 13, 2019 at 5:28:11 PM UTC-4, João Matos wrote: > > I have several tables that use common controllers. To do that I must pass > the table name using a request var in the 1st call, which I save to session > (I must do this because that controller calls others and I don't want to > have to pass the table var every time). >
It would help to see some code, but I don't see why the table name can't simply be part of the URL for any given page that needs it. The alternative is to add some kind of session ID to every URL, which is actually more complicated to manage. > And there is other state vars I save to session. > > Because of this and to allow the users to have several tabs, I must be > able to distinguish between them. > To distinguish the tabs, you would need to add some kind of ID to the URL, and then to ensure the user does not break out of that tab-specific session, all links on the page would need that ID as well. Alternatively, if this tab-specific state is needed in only a small portion of the app, you might consider making that part of the app a single page where all the interaction is controlled client-side via Javascript, making Ajax calls to the server. In that case, you could either store the relevant state in the browser (and send whatever is needed to the server with the Ajax requests), or just have a session ID in the page that gets sent with every Ajax request. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.