| Author |
File Download and page navigation
|
Ian Waghorne
Greenhorn
Joined: Jan 24, 2008
Posts: 2
|
|
I was wondering if anyone could help me? I�m new to JSF (in fact Java), and I�m having problems implementing a feature. Currently we�re providing a link on a page to allow a user to download a file onto their local machine, which I�ve successfully built, resulting in a Save As dialogue box being displayed by the client. My problem is I need to find a way of automatically navigating the user to a confirmation screen once the download has been completed. There are some good reasons for this, which I won�t bore you with. I�ve tried setting up a navigation rule in the faces-config.xml. But all that happens is the client�s browser simply gets direct to the confirmation screen without downloading the file. The same happens with a redirect. Is automatic navigation possible after a file download is complete? Many thanks for any advice/help offered! Ian.
|
 |
Bob Good
Ranch Hand
Joined: Jan 09, 2008
Posts: 86
|
|
Are you in the browser in javascript when the download completes? If so you can do the following: 1) set up a hidden button with an action method to invoke a backing bean action, something like this: 2) in BackingBean.navAction method return a string to trigger navigatyion in the usual manner. 3) When the download is complete, trigger the navigation from javascript:
|
 |
 |
|
|
subject: File Download and page navigation
|
|
|