【问题标题】:<rich:fileUpload> component controls issues in RichFaces 4.3<rich:fileUpload> 组件控制 RichFaces 4.3 中的问题
【发布时间】:2014-02-21 05:56:47
【问题描述】:

版本:

  • RichFaces:4.3
  • 我的面孔:2.1

问题:

RichFaces v4.3 中的&lt;rich:fileUpload&gt; 组件存在两个问题,在 v3.0 中可以正常工作:

  1. autoclear="true" 属性似乎不起作用。我在下面提到了两个链接(这两个链接似乎都没有提到"autoclear" 属性):
  2. 使用上传按钮上传文件后,停止按钮不显示。

代码:

<rich:fileUpload maxFilesQuantity="5" fileUploadListener="#{bean.uploadFile}" 
               deleteLabel="RemoveNow" addLabel="BrowseFiles" uploadLabel="AttachFile" autoclear="true">
                   <a4j:ajax event="uploadcomplete" execute="@none" render="filePanel" />
 </rich:fileUpload>

【问题讨论】:

    标签: file-upload jsf-2 richfaces


    【解决方案1】:

    这些东西在 RF 4 中没有实现。

    如果您需要在上传后清除列表,您可以执行以下操作:

    <a4j:ajax event="uploadcomplete" 
        oncomplete="#{rich:component('fileUpload')}.clearButton.triggerHandler('click')" … />
    

    【讨论】:

    • 非常感谢@Makhiel 或您的回复。我将尝试上述方法并在结果后更新帖子。对于“停止”按钮,是不是不能以任何方式实现?
    猜你喜欢
    • 2015-10-18
    • 2012-01-15
    • 2011-01-07
    • 1970-01-01
    • 2016-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-26
    相关资源
    最近更新 更多