[excel] Need ability to choose between Content-Disposition: inline and
Content-Disposition: attachment for downloads
--------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-4664
URL:
https://jira.jboss.org/browse/JBSEAM-4664
Project: Seam
Issue Type: Patch
Components: Excel
Affects Versions: 2.2.1.CR1, 2.2.0.GA, 2.2.0.CR1, 2.1.2.GA, 2.1.2.CR2, 2.1.2.CR1,
2.1.1.GA, 2.1.1.CR2, 2.1.1.CR1, 2.1.0.SP1, 2.1.0.GA, 2.0.3.CR1, 2.0.2.SP1, 2.0.1.GA,
2.0.0.GA, 1.2.1.GA, 1.2.0.GA, 1.1.6.GA, 1.1.5.GA, 1.1.1.GA, 1.1.0.GA, 1.0.1, 1.0,
2.2.1.CR2, 3.0.0.BETA1, The future
Reporter: Eric Jung
Attachments: UIWorkbook.java.diff
When downloading an Excel workbook, org.jboss.seam.excel.ui.UIWorkbook always sends the
HTTP response header "Content-Disposition: inline; filename="xxxx.xls"
where xxxx is the value of e:workbook's filename attribute.
This header causes problems on some installations of IE 6, 7, and 8 with Excel 2002.
Depending on how some settings are configured in the OS, the document may never open after
download.
Changing the HTTP response header value to "Content-Disposition: attachment;
filename="xxxx.xls" solves the problem. Notice the only difference is the word
"attachment" vs. "inline". I would like the capability to choose
between these two, just like jboss-seam-pdf.jar provides the same capability with its
org.jboss.seam.pdf.ui.UIDocument:
<pdf:document title="Some Title" disposition="attachment"> ...
</pdf:document>
Mail attachments in Seam provide the same capability:
<m:attachment value="#{person.photo}" contentType="image/png"
disposition="inline"/>
I'm attaching a patch against Seam 2.2 trunk which provides this capability. With this
patch, we can now write:
<e:workbook type="jxl" disposition="attachment" ...> ...
</e:workbook>
or
<e:workbook type="jxl" disposition="inline" ...> ...
</e:workbook>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira