代码之家  ›  专栏  ›  技术社区  ›  Antoine O

在javascript中调用seam远程函数时处理连接错误

  •  0
  • Antoine O  · 技术社区  · 12 年前

    我将seam 2与javscript远程对象一起使用,它工作得很好,但我想知道如何处理服务器是否不可用。目前,它在javascript弹出窗口上显示503错误,这非常糟糕。

    我试过了

    try {
        var remoteObject= Seam.Component.getInstance("remoteObject");
        if(remoteObject){
            sessionChecker.remoteFunction(parameter, functionCallBack);
        }else{
            alert('error');
        }
    } catch(err) {
        alert('error');
    }
    

    但没有成功->仍然是恼人的默认弹出窗口。

    1 回复  |  直到 12 年前
        1
  •  0
  •   nigi    12 年前

    看见 this link

    问题中附带的补丁文件或至少使用接缝2.2.2。