We need to see all the relevant code -- you haven't shown the link_callback 
code where the session is manipulated.

Anyway, it's not the same problem as the one originally raised in this 
thread -- you don't have two simultaneous Ajax requests writing to the 
session (your Ajax request that affects the session gets called after the 
two Ajax components have loaded and the user interacts with the form), and 
your problem persists throughout the session.

It's still not clear exactly what behavior you are observing. It might help 
if you can produce a simplified example that exhibits the problem, show 
*all* of the relevant code, explain the exact symptoms, and do some 
diagnostic work to see what data are being sent and received with each Ajax 
request, the state of the session at each point, etc.

Anthony

On Tuesday, July 14, 2015 at 1:16:30 AM UTC-4, 黄祥 wrote:
>
> sale_order_checkout use ajax callback to modify session.sale_order value, 
> that is in the form in the HTML (not web2py form)
>
> the form that must submit twice is the one in the first component : 
> sale_order_form which is generated via SQLFORM.factory.
> the form in second component is responsive (ajax callback is update 
> everytime i change the value)
>
> Already check the developer tools and request.toolbar() for that, after 
> clean all session, access sale_order the value of session.sale_order is 
> empty, in order to fill the session, i must hit submit twice for fill the 
> session, or receive form.errors (after first time hit the submit button, 
> the session value is still empty). 
>
> another funny reaction is, after clean all session, access the page with 2 
> components, hit submit once, after that refresh the page (page with 2 
> components), i must submit twice again to get the form react (either error 
> or accepted)
>
> i use web2py latest version, in win 7 64, test in chrome in firefox latest 
> version
>
> not sure which part i missed to get it work.
>
> thanks and best regards,
> stifan
>

-- 
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.

Reply via email to