Announcement Announcement Module
Collapse
No announcement yet.
Populating spring webflow data in XmlHttpRequest object Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Populating spring webflow data in XmlHttpRequest object

    Hello

    I am making an ajax request to my web flow application. I want to be able to act appropriately on the client side if a server side exception is thrown while processing the transition. Is there a way to have webflow populate the XmlHttpRequest object with the exception information that would get returned when there is an exception?

    e.g.

    1) Client ajax request is made:
    Code:
    $('#ajaxDiv').load('${flowExecutionUrl}&_eventId=loadAsynchronousDetails #ajaxDiv');
    2) Webflow transition handles the request:

    Code:
    <view-state id="myViewState" >
      <transition on="loadAsynchronousDetails">
        <evaluate expression="mybean.myLoadAsyncMethod()"  />
      </transition>
    </view-state>
    3) But while running "mybean.myLoadAsyncMethod()" there is an unexpected exception, so the client side receives an ajax error:

    Code:
    	$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
    		
    		<!-- jqXHR - is the XMLHttpRequest object,  but the exception recorded is always the top level "InternalServerError" ... I'd like to record the more meaningful error from my bean and use this to react approriately ... can this be set somehow? -->
    		
    	});
    jqXHR - is the XMLHttpRequest object, but the exception recorded is always the top level "InternalServerError" ... I'd like to record the more meaningful error from my bean and use this to react approriately ... can this be set somehow?

    thanks
    Andy
Working...
X