sending the user to the login page when the session expires while filling out a form.

- sending back response code SC_UNAUTHORIZED from ajax servlet when the user has been logged out.

updated textarea test.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5058 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2007-02-06 23:45:52 +00:00
parent b98c2309a4
commit d25f46bc0f
5 changed files with 40 additions and 18 deletions

View File

@@ -3719,11 +3719,18 @@ AjaxHelper.createRequest = function(target, serverMethod, methodArgs, load, erro
{
AjaxHelper._loadHandler(result);
});
result.error = error || function(type, e)
result.error = error || function(type, e, impl)
{
dojo.debug("error [" + type + "] " + e.message);
_show_error(document.createTextNode(e.message));
AjaxHelper._loadHandler(this);
if (impl.status == 401)
{
document.getElementById("logout").onclick();
}
else
{
_show_error(document.createTextNode(e.message));
AjaxHelper._loadHandler(this);
}
};
return result;
}