Announcement Announcement Module
Collapse
No announcement yet.
Web Script Response Status handling in JavaScript Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 05:39 PM.

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

    Kev

    Comment


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

      Comment

      Working...
      X