[Seaside] add parameter to settings onAjaxError/ajaxErrorHandler

Sabine Manaa manaa.sabine at gmail.com
Mon Feb 6 10:57:07 UTC 2017


Hi,

I have a working solution for redirect the user to the login page as
described here [1][2][3].

In short words:
I add addLoadScript: html jQuery document onAjaxError: (self
ajaxErrorHandler asFunction: #('event' 'jqxhr' 'settings' 'exception')))
with >>ajaxErrorHandler
^ ' if (jqxhr.status == 403) { 
   alert("Logoff text......."); 
   window.location.href = settings.url.split("?")[0].replace("help",""); 
   } else { 
   if (jqxhr.status == 200) { } else {  
   alert("error text.....: " + exception +"jqxhr.status:"+jqxhr.status); }}'

I want to add one more point as described here:
http://stackoverflow.com/a/7462590/2611391

I want to suppress this error message dialog in one certain case with
something like this:
 if(settings.suppressErrors) {
        return;
    }

So my question is how can I add a value like 'suppressErrors' to my settings
object so that in the ajaxErrorHandler I can ask for
'settings.suppressErrors'... 

Regards
Sabine

[1]http://forum.world.st/Custom-error-handler-for-Seaside-expiration-and-AJAX-errors-WAS-Re-Seaside-AJAX-script-amp-html-vs-o-td4916950.html
[2]http://forum.world.st/Improved-HTML-error-handler-td4927552.html#a4927734
[3]http://forum.world.st/Ajax-requests-not-redirecting-to-Login-page-after-session-timeout-td4802509.html#a4802521

After logoff AND deleting the users account



--
View this message in context: http://forum.world.st/add-parameter-to-settings-onAjaxError-ajaxErrorHandler-tp4933109.html
Sent from the Seaside General mailing list archive at Nabble.com.


More information about the seaside mailing list