Update attribute and onComplete in p:fileUpload doesnt work in IE10. In IE 9 sizeLimit attribute is ignored. Has anyone came across this situation.
I have tried calling p:remotecommand by using onComplete attribute on p:fileUoload but it looks like even onComplete doesn't work in IE 10
<h:form id="file" enctype="multipart/form-data">
<p:outputLabel value="Test........"></p:outputLabel>
<p:fileUpload label="Browse..." description="Select PDF file"
auto="true" sizeLimit="500000"
oncomplete="refreshData()"
onstart="alert('test');" mode="advanced"
fileUploadListener="#{fileUpload.handleFileUpload}"
allowTypes="/(\.|\/)(pdf|png)$/">
</p:fileUpload>
<p:inputText value="#{fileUpload.test}" id="test" />
<p:remoteCommand name="refreshData" action="#{fileUpload.setData}"
update="test"></p:remoteCommand>
</h:form>
It seems to be a problem with position absolute. Change it to fixed. It works on my side:
I've got also problems with p:fileUpload after upgrading to IE10. The JavaScript errors began to occur ('syntax error in XML document').
It helped to change the X-UA-Compatible header to IE=EmulateIE9:
This is fixed in the new 4.0 Primefaces release, however if you are still on an older version of Primefaces you might still need a workaround.
I was able to update after a file upload by using the onstart attribute which does still work in IE 10.
Create a hidden field that contains a value that gets updated as part of the method called from the fileUploadListener. Then set the onstart attribute of the p:fileUpload to something like the following:
I had to face this problem with PF 5.1 migrated from PF 3 and thanks to this post i resolved:
this is the html code generated:
and this the CSS which resolved this problem:
Use this CSS workaround. I derived this from the jQuery FileUpload component commit the fixed this issue.
Finally realized that its a bug in primefaces.
http://forum.primefaces.org/viewtopic.php?f=3&t=28860#p94845
http://code.google.com/p/primefaces/issues/detail?id=5355
Fixed in: