On Friday, 30 March 2012 14:38:39 UTC+11, Limedrop wrote:
>
> Mmmmm.  Picking might not be the issue.  I would try to take javascript 
> out of the equation first.  What if you simulated the javascript in a 
> second server-side controller?  See if it can retrieve, update and save the 
> session?
>
>  
I now have a second controller which adds a unique entry each page 
refresh.  
When I visit the controller pages, the entries are properly added and 
retained.  When I call via AJAX, the entries are not, despite being added 
locally (eg printing the elements to console after adding).  

I thought it might be that I am trying to add request.vars in the ajax 
call, but it doesn't remember even string literals being added.

Confused...

ahhh... 
But when I add another (primitive) variable to the session and change that 
within the (server side of the) ajax call everything starts working 
properly. 
So, presumably web2py doesn't notice changes to the instance so chooses not 
to update session, changing the primitive causes it to update all the 
session variables including the instance. 

Reply via email to