I tried to create a simple mobile page with an <p:fileDownload> function.
Everytime I click the button on my PC (Firefox 10.*) a download-dialog appears an I'm able to save the file to disc.
When I try the same on my mobile device (SGS II) with different browser (built-in, Opera, Dolphin hd) I only get an *.htm download.
Only Mozilla Firefox (mobile) seems to be able to save the file correctly.
I'm not sure whats the reason for this and I don't want to blame the Primefaces library but I'm stuck at this and hope to get some clues from the community.
Thanks in advance!
This is my view.xhtml
Code: Select all
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:pm="http://primefaces.org/mobile"
contentType="text/html"
encoding="UTF-8">
<pm:page title="Download">
<pm:view>
<pm:content>
<h:form id="hform">
...
<p:commandButton value="Download" ajax="false" disabled="#{viewBean.invalidCode}">
<p:fileDownload value="#{viewBean.file}"/>
</p:commandButton>
</h:form>
</pm:content>
</pm:view>
</pm:page>
</f:view>
My server is an Tomcat 7 with Mojarra 2.1.6 running Primefaces Core 3.1.1 and Mobile 0.9.1.
Once again, any help would be appreciated!