I am searching for something similar for my current project. Unfortunately no
answers til now? There must however be a better solution, or not?
Any help would be appreciated.
Thorbjørn
-Original Message-
From: Gast, Thorsten [mailto:thorsten.g...@wirecard.com]
Sent: Wednesday, July 14, 2010 1:36 PM
To: users@wicket.apache.org
Subject: Accessing transport within wicketGlobalFailureHandler
Hi,
I want to use wicketGlobalFailureHandler() to handle some http status codes
from an Ajax-Call.
Currently I am doing something like this - which works fine - but is in my
opinion not very nice.
function wicketGlobalFailureHandler() {
var t = Wicket.Ajax.transports;
for (var i = 0; i < t.length; ++i) {
if (t[i].readyState == 4) {
var status = t[i].status;
if (status == '401') {
alert('Do something...');
}
if (status == '403') {
alert('Do another thing...');
}
}
}
}
Is there a better way, instead of getting all transports and then checking
readyState and status code?
Is there a possibility to get only the current transport, which triggered the
failure handler?
Or maybe I'm doing something completely wrong and there is a better approach
how I can handle these cases...
Regards
Thorsten
--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org