Hi guys,
If I have a session timeout, and then I click on a anchor that is associated to a ajax call, it does nothing (which is expected) but it does not forward me to the Login page either, as it happens with a timeout and a normal request. Any idea how can solve this? I saw in another email this: html document addLoadScript: (html jQuery document onAjaxError: (self ajaxErrorHandler asFunction: #('event' 'jqxhr' 'settings' 'exception'))) But not sure if it is of help. Thanks in advance, _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Mariano,
Thats something I wrote. The #ajaxErrorHandler method goes like this: ajaxErrorHandler ^ ' if (jqxhr.status == 403) { alert("For security reasons we sign people out during periods of inactivity. Please sign in again."); window.location.href = settings.url.split("?")[0].replace("help",""); } else { alert("This program just broke. You can either try again, sign out and sign in and try again, or contact us about error: " + exception); }' the window.location.href line just cleans up the page url by removing the expired session info. Seaside then starts a new session and the url is sent through the #initialRequest: mechanism. In #initialRequest: for my application I detect which page they were on, show them the login page, then once they've authenticated show them the page they were on. Hope this helps Paul.
|
On Thu, Jan 29, 2015 at 3:27 PM, Paul DeBruicker <[hidden email]> wrote: Hi Mariano, Thanks Paul!!! That did work perfectly. Thank you very much.
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |