09-05-2023, 01:09 PM
(This post was last modified: 09-05-2023, 08:02 PM by jeroen.rottink.)
Hi Alexandre,
I went ahead yesterday with changes to the current version IW15.3.12
Therefor I changed the initial value of the xValue variable to -2 in IWCommon.IW.Session.queryStatus. onError the would call TIWMonitor.jsCallbackName with value == -2 and with -1 when there is no session.
My TIWMonitor.jsCallbackName looks like:
This didn't work at first. I got a 404 Not found exception. I don't exactly understand why but the solution seems setting TIWSessionController.PostRedirectGet = prgEnabled. It's still not 100% foolproof but it is a good start.
Preferable I would be able to start a new session from monitorCalled() without the need to reload() so it would keep trying when it doesn't work the first time.
I went ahead yesterday with changes to the current version IW15.3.12
- In IW15.3.12 I can't make a difference in the function TIWMonitor.jsCallbackName between the situation
** No server or network problem and
** Server is back but session doesn't exist
Therefor I changed the initial value of the xValue variable to -2 in IWCommon.IW.Session.queryStatus. onError the would call TIWMonitor.jsCallbackName with value == -2 and with -1 when there is no session.
My TIWMonitor.jsCallbackName looks like:
Code:
function monitorCalled(value) {
if (value === -2) {
// network error, see updated IWCommon.IW.Session.queryStatus
$('#no-server').show();
}
else if (value === -1) {
// server back but session gone, should be restarted
window.location.reload(true);
}
else {
$('#no-server').hide();
}
}This didn't work at first. I got a 404 Not found exception. I don't exactly understand why but the solution seems setting TIWSessionController.PostRedirectGet = prgEnabled. It's still not 100% foolproof but it is a good start.
Preferable I would be able to start a new session from monitorCalled() without the need to reload() so it would keep trying when it doesn't work the first time.

