title: How to clear validation errors after providing a file download on form submit?
body: <p>I've got a page where there is an input field and a button. Clicking the button generates a PDF report, based on the value entered in the input field. My problem lies in the fact that the input field needs some special formatting, and I have a validator that will fire if the required format is not present.</p>
  
  <p>Suppose I enter an invalid value in the field, then click the button. The PDF report won't be generated because of the validation, and the field becomes red, as expected. But then I enter a correct value (with the field still red) and press the button. The report gets generated but the field remains red. That's because I've used FacesContext.getCurrentInstance().responseComplete() after the PDF generation so the normal Faces lifecycle has been bypassed and the clearing of the validation errors does not trigger anymore for this request.</p>
  
  <p>How can I generate the PDF report but still force Faces to determine that the validation error should be cleared? Thanks!</p>