tags:

views:

24

answers:

1

Can A4J handle a situation in which 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.

+1  A: 

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);

}
Odelya