Results 1 to 2 of 2

Thread: Accesing response in flow

  1. #1
    Join Date
    Sep 2006
    Posts
    27

    Red face Accesing response in flow

    How can I pass request response objects to action bean method assetCheckOut?

    Code:
    <action-state id="checkout">
    		<!-- action-state must have an evaluate element, a set element, or similar.  See the XSD. -->		
    		 <action bean="assetCheckoutFacade" method="assetCheckOut"/>
             <transition on="success" to="checkoutdone"/>
    	</action-state>
    I have to download a file so wana do
    Code:
       response.setContentType("application-xdownload");
            response.setHeader("Content-Disposition", "attachment; filename=\"MyFile\"");
    Please help?

  2. #2
    Join Date
    Nov 2008
    Posts
    4

    Default

    Change your assetCheckOut method to accept a RequestContext:

    Code:
    <action bean="assetCheckoutFacade" method="assetCheckOut(flowExecutionRequest)"/>
    then in your assetCheckOut method use:

    Code:
    HttpServletResponse response = (HttpServletResponse) flowExecutionRequest.getExternalRequest().getNativeResponse();
    Andrew

Posting Permissions

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