Portlet File Download

Definition Of Portlet

Hi, I have a problem at created a portlet for the download file. When I set the response.setContentType('application/octect'); and response.setHeader('Content-disposition', 'attachment;filename=output.xml'); my portlet don't work. Is There a portlet the download a file??? Best regards.

Displaying a spinning wheel with Content Launch builder or any File Download functionality in Web Experience Factory (WEF) has always been tricky. Kirmes In Second Life Simulation. Once the user clicks on a link/button to download a file the user request moves server-side and if that operation takes too long then there is no way to let the user know that server is working on their request. The out-of-the box progress indicator that WEF provides is not designed to work in this scenario. The ideal solution in this case is to improve the performance of the file download service.

However we don’t live in a perfect world and hence there can be cases where the customer is aware of the slow performance of the file download service caused due to their back-end services and process which they cannot fix immediately. Instead the request to the development team is to show some kind of an indicator such as spinning wheel to the end user while the file download service completes its processing. I had a similar requirement on one of my delivery engagements and thus I ended up building a custom solution to display a spinning wheel while downloading a PDF file which was taking lot of time to download.

Following were the sequence of steps I implemented: 1. Ethical Aspects Of Strategic Financial Management Pdf. Add a spinning wheel image to the HTML page and set the display to none 2.

Add HTML Event Action builder which will be called on click of button that triggers the PDF download. Select Action Type as “Run a Script” b. Include following JavaScript code in the builder – Logic to display the spinning wheel image – Create a cookie say “FileDownload”. Set some initial value say “Started” – Set the timer to periodically check the cookie value – If the cookie value has changed to “Completed”, then hide the spinning wheel image and reset the cookie Sample Code – c.

Globalink Power Translator 64 Bits. Set the Overwrite Rule to “Prepend new value” under Advanced section 3. Add the following Java code at the end of your Java method that is called on the button click which will download the PDF. This additional Java code updates the value of FileDownload cookie to “Completed” once the file download is complete before returning the response to client-side 4. Once the JavaScript reads the updated cookie value as “Completed”, it hides the spinning wheel image.

Comments are closed.