p:fileUpload 中的更新属性和 onComplete 在 IE10 中不起作用。在 IE 9 中 sizeLimit 属性被忽略。有没有人遇到过这种情况。
我尝试通过在 p:fileUoload 上使用 onComplete 属性来调用 p:remotecommand 但看起来即使 onComplete 在 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>
最佳答案
终于意识到它是primefaces中的一个错误。
http://forum.primefaces.org/viewtopic.php?f=3&t=28860#p94845
http://code.google.com/p/primefaces/issues/detail?id=5355
固定在:
TargetVersion-4.0
TargetVersion-3.5.9
关于file-upload - 素面 p :fileUpload doesnt work in IE 10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16036655/