0
上传不会自动启动时,我选择一个文件。仍然需要通过点击上传按钮来手动上传。立即上传/自动上传与丰富:文件上传
<rich:fileUpload ....
immediateUpload="true">
有没有办法使这项工作? 我使用richfaces 4.2.1。
上传不会自动启动时,我选择一个文件。仍然需要通过点击上传按钮来手动上传。立即上传/自动上传与丰富:文件上传
<rich:fileUpload ....
immediateUpload="true">
有没有办法使这项工作? 我使用richfaces 4.2.1。
首先复制fileupload.js到您的应用程序并添加相同的在你的页面如下图所示:
<script type="text/javascript" src="#{facesContext.externalContext.requestContextPath}/js/fileupload.js"></script>
二去fileUpload.js,找到一个叫__updateButtons
功能和更新首先如果是用this.__startUpload()
检查项目长度;
像下面一样。
__updateButtons: function() {
if (!this.loadableItem && this.list.children(".rf-fu-itm").size()) {
if (this.items.length) {
//this.uploadButton.css("display", "inline-block");
this.__startUpload();// New - Added the immediate upload to work.
} else {