|
|
|
|
|
|
Re: How to provide a download button? [message #948957 is a reply to message #948918] |
Thu, 18 October 2012 14:49 |
|
Some browsers (notably IE) may block downloads if triggered by JavaScript (which of course RAP uses). So creating a Browser widget to trigger the download from a button may trigger this behavior. When this happens in IE, depending on settings, the "yellow information bar" will pop in from the top prompting the user to approve the download. Unfortunately, this will cause the page to reload losing whatever context you had. Because of these issues, I prefer the solution of using a link. If you want it to look like a button, perhaps you could add custom CSS style.
To answer your question about when to dispose the browser widget, you have to wait until the download is complete. That would be once the DownloadServiceHandler.service() method is complete, so you should setup some sort of listener to notify your view once the service handler finishes. Then you can dispose the Browser widget and unregister the service handler.
Hope that helps,
Cole
|
|
|
Powered by
FUDForum. Page generated in 0.03893 seconds