Results 1 to 3 of 3

Thread: Web Script Response Status handling in JavaScript

  1. #1

    Default Web Script Response Status handling in JavaScript

    Is it correct to expect the redirect logic for Web Script error handling to apply to JavaScript controllers? The behavior described here (http://wiki.alfresco.com/wiki/Web_Sc...esponse_Status) works as expected for Java based controllers. Specifically, when the status is set to 500 in our Java controller as follows:

    Code:
        	}catch(Exception re){
        		status.setException(re);    		
        		status.setCode(500);
        		status.setMessage("Browse Component Failed to Load");
        		status.setRedirect(true);     		
        	}
    This invokes our hmtl.500.ftl file with the "status" object in context. All is well.

    However, if I set the status to 500 in a JavaScript controller as follows:

    Code:
    	status.code=500
    	status.redirect=true
    The hmtl.500.ftl file is skipped and our local 500.html error page is displayed.

    Thanks,

    Bob
    Last edited by BoJo; Dec 10th, 2010 at 05:39 PM.

  2. #2

    Default

    The behaviour should indeed be the same. So it sounds like a bug, I'll take a look.

    Kev

  3. #3

    Default

    This is a great feature. Thanks for looking into the [potential] issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •