[ http://jira.jboss.com/jira/browse/RF-3498?page=comments#action_12413981 ]
Ken A. Rederg?rd commented on RF-3498:
--------------------------------------
By the way: I tried to specify type with the type parameter set to
application/pdf but the browser still displays the binary content of the file.
<a4j:commandLink id="generatePdf" rendered="#{not empty
reportBean.salaryBasis}" actionListener="#{reportBean.generatePdf}"
type="application/pdf">
Snippet from the reportBean.generatePdf:
File pdfFile = new File(filename);
fis = new FileInputStream(pdfFile);
out = response.getOutputStream();
response.setContentType("application/pdf");
response.setHeader("Content-Disposition", "attachment;
filename=" + filename + ";");
int c;
while ((c = fis.read()) != -1) {
out.write(c);
}
fis.close();
out.flush();
out.close();
StateManager stateManager =
faces.getApplication().getStateManager();
stateManager.saveSerializedView(faces);
faces.responseComplete();
> h:commandLink not working after having been updated with aj4:support
> ---------------------------------------------------------------------
>
> Key: RF-3498
> URL: http://jira.jboss.com/jira/browse/RF-3498
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.2.0
> Environment: Firefox 2.0.0.14 MacOSX 10.5.2
> Reporter: Ken A. Rederg?rd
>
> When clicking on a h:commandLink that is part of a h:form that has been
> updated by a a4j:support (outside of the mentioned h:form) the command is not
> ran and the following JavaScript error occurs (Firebug):
> form has no properties
> oamSetHiddenInput("topForm", "topForm:_idcl",
> "topForm:generateSalaryBasisPdf")a4j_3_2_0.SR1-SNA... (line 115)
> oamSubmitForm("topForm", "topForm:generateSalaryBasisPdf", undefined,
> undefined)a4j_3_2_0.SR1-SNA... (line 166)
> onclick(click clientX=0, clientY=0)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues