【发布时间】:2013-11-29 19:42:13
【问题描述】:
我已经使用 RichFaces 4.3 实现了文件上传。文件上传工作正常,关于文件类型的警报工作正常,但关于最大文件大小限制的警告没有。文件上传代码:
<rich:fileUpload id="bannerUpload"
fileUploadListener="#{bean.bannerListener}"
acceptedTypes="png, gif, jpg, jpeg"
ontyperejected="alert('#{msg.bannerFormatRestriction}');"
maxFilesQuantity="1"
sizeExceededLabel="File size is restricted. Max allowed size is 1 MB."
serverErrorLabel="File was not uploaded. Please try again."
addLabel="Select image for banner">
</rich:fileUpload>
设置上下文参数并且限制起作用。但不显示警报消息。任何建议表示赞赏。
更新
消息问题与fileupload.js.jsf line 213有关。
Firebug 中的错误消息:Load denied by X-Frame-Options: ...?rf_fu_uid=... does not permit framing. 和Error: Permission denied to access property 'document' var contentDocument = event.target.contentWindow.document。
【问题讨论】: