0

I want to refresh jsf page(or using ajax to update part of page), when downloading a file. But there is a conflict between them now. html code like that:

<h:commandButton id="download-button" name="download-button"
action="#{myController.download}" value="download"></h:commandButton> 
licaomeng
  • 919
  • 2
  • 13
  • 27
  • Do you want to refresh before download starts, or after download finishes? – BalusC Dec 02 '15 at 08:43
  • Before downloads starts. I will appreciate it, if you have good solution. – licaomeng Dec 02 '15 at 09:00
  • But there are some problems, I want to use ajax update current page, but not open a new page. – licaomeng Dec 02 '15 at 09:16
  • Question is perhaps different, but answer is the same: conditionally render some JavaScript which in turn triggers download. – BalusC Dec 02 '15 at 09:18
  • How to render the JavaScript after clicking commandButton? Current method is invalid. I have added the following code: ` alert(123); ` – licaomeng Dec 02 '15 at 10:17

0 Answers0