开发者

JSF Handle served-side exception in browser with A4J

Can A4J handle a situation in whi开发者_Python百科ch ajax call to a server ends with an exception? By handle I mean can it for instance present user with a dialog box stating that an exception has occured? The default behaviour of A4J in presence of a server side exception is to just do nothing which is somewhat misleading.


Yes.

You can do it with A4J:

add this to your javascript on any page:

A4J.AJAX.onError = function(req, status, message){

    window.alert("Custom onError handler "+message);

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜