Hello all,
Would anyone help us with how to implement the download function in the swf-booking-faces project in SWF 2.0.8 and Spring 3.0? We have a null-transition in the flow where we evaluate the following service:
The service run successfully, however, the download dialog is not displayed on the client side.Code:public void showDocument{...} HttpServletResponse response = (HttpServletResponse) requestContext.getExternalContext().getNativeResponse(); response.reset(); response.setCharacterEncoding("UTF-8"); response.setContentType(getFileContentType()); response.setHeader("Content-disposition", "attachment; filename=\"" + getOriginalFileName() +"\""); response.setContentLength(getFileContent().length); response.setHeader("Pragma", "public"); response.setHeader("Cache-control", "private"); try { ServletOutputStream sos = response.getOutputStream(); sos.write(getFileContent()); sos.flush(); requestContext.getExternalContext().recordResponseComplete(); } }
Any help would be appreciated.
Thanks,
Fanta


Reply With Quote