Hi All,
My first post here but I can see myself frequenting as I battle with
JSF!
I have a page whereby people search for reports and the results are returned to them in a datatable. They are first faced with some input input controls to refine their search, they click search and control goes to a session backing bean. The backing bean gets the records from the database, populates a list, sets a boolean value to true and then reloads the page. The boolean value causes a previously non-rendered datatable to be displayed. Each row will have contain a picture of a PDF. Upon clicking this PDF, the user should be given a download prompt and be able to download the corresponding PDF.
This all works fine, however after the PDF has been downloaded, I cannot continue to use the page and must navigate to a different page and then return. If I use other controls within the same form, I get the download prompt again for the same file, as well as an exception thrown:
Here is the code I am using to return the PDF through the response:
The PDF pictures which prompt the download when clicked are surrounded by a command link which has an action listener which sets
PDFArchiveChosen. The action for the link is the method shown above, which streams the PDF to the user.
What I want is for users to click on a PDF picture and download the corresponding file. Once they've done that, I want them to be able to use the page as normal: run different searches, click other pdf pictures to get different files downloaded etc.
Thanks,
James