Handle Connection Error when calling seam remote function in javascript
-
29-06-2021 - |
Pergunta
I use seam 2 with javscript remote object and it works fine but I wonder how to handle if the server is unavaible. Currently it display an 503 error on a javascript popup, which is quite awful.
i tried
try {
var remoteObject= Seam.Component.getInstance("remoteObject");
if(remoteObject){
sessionChecker.remoteFunction(parameter, functionCallBack);
}else{
alert('error');
}
} catch(err) {
alert('error');
}
but without success -> still the annoying default popup.
Solução
see this link.
Either patch file attached in issue or use at least Seam 2.2.2.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow