By the way, I just noticed pushing the "Back" button in the main form (not loaded with ajax, just a normal grid created by a controller), that it is also pointing to the url of the last loaded grid. Probable another side effect of the same problem.
Best regards. El lunes, 26 de octubre de 2015, 11:39:51 (UTC+1), Carlos Kitu escribió: > > Hi, I have a sqlform with four tabs. There is a main form and 4 additional > tabs. In each tab there is one grid with a related table to the one in the > main form (1 to many relationship), and they are loaded gracefully using > the LOAD function and ajax. > In my first version, I used a separate function/view for each grid, they > are called by every LOAD command, and everything worked fine. > > The next time I needed something like that, I thought that writing 4 > functions/views for the grids was too redundant as each function was quite > similar to the other, and I only needed to change a few parameters (table > name, related field) and decided to create a single function with the > corresponding parameters to show the corresponding table in each tab/grid. > Everything seemed to work fine, but in my tests, I noticed that when I > created a new record in one of those tabs, and there was an automatic > reload of the grid (in grid mode), it always displayed the last grid loaded > in the initial load of the tabs. Pushing F5 and forcing an initial reload > of the multi-tabbed form, forced every grid to display properly. > > Digging into SQLFORM.grid, I noticed a line: > referrer = session.get('_web2py_grid_referrer_' + formname, url()) > That could explain why I'm always getting the last grid loaded in the > initial load of the multitabbed form. I would like to confirm this and ask > you if there would be any workaround not dependent on a session variable, > that for sure will cause concurrency issues. > > Best regards and thankyou for this helpful group. > > -- 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.