【问题标题】:Why is primefaces Fileupload not Visible?为什么primefaces Fileupload不可见?
【发布时间】:2011-03-04 07:04:40
【问题描述】:

文件上传控件在浏览器中不可见(虽然渲染)。

当我从浏览器查看源代码时,它是这样渲染的..

<script type="text/javascript">
jQuery(function() {widget_exeupload1 = new PrimeFaces.widget.Uploader('exeupload1', {uploader:'/jsfscrb/javax.faces.resource/fileupload/uploadify.swf.xhtml?ln=primefaces&amp;v=2.2.1',script:'/jsfscrb/home.xhtml',cancelImg:'/jsfscrb/javax.faces.resource/fileupload/cancel.png.xhtml?ln=primefaces&amp;v=2.2.1',formId:'j_idt225',fileDataName:'exeupload1_file',multi:false,auto:true,inputFileId:'exeupload1_file',jsessionid:'f99f510153df31f57a310fb8de8e',update:'dlist1 resmsg',fileDesc:'Resource Files'});});
</script>

我使用 Fedora Core 3、NetBeans 6.8、Mojarra 2.0.4 和 glassfish 服务器 v3。在 Firefox 2.0.0.20 和 Opera 10.11 中观察到上述行为。

我想知道问题可能出在哪里,老实说无法猜到。非常欢迎您帮助识别和/或解决问题!!!

问题可能出在哪里?

  • FedoraCore 3 图形包
  • Primefaces
  • Firefox 或 Opera

【问题讨论】:

    标签: firefox jsf-2 opera primefaces fedora-core


    【解决方案1】:

    PrimeFaces 2.2.x 文件上传使用 flash,因此取决于 flash 插件,它可能存在问题。试试 3.0 的新文件上传,它使用 HTML5 优雅降级。 3.0 不需要闪存。

    http://www.primefaces.org/showcase/ui/file/upload/basic.xhtml

    【讨论】:

    • PrimeFaces 3.0 不是还在开发中吗?
    • HTML 5 意味着我需要使用比 FF 2.0.0.20 或 Opera 10.51 更高级的浏览器,对吗?这些版本是我可以在 Fedora 3 中安装的最高版本。我必须升级浏览器才能使&lt;p:fileUpload/&gt; 正常工作吗?没有别的办法吗?
    • 对于所有其他 Primefaces 组件,我想使用 Primefaces 2.2.1,而对于 FileUpload 组件,我想在同一个 JSF 页面内使用 primefaces 3.0 SNAPSHOT。有可能吗?
    猜你喜欢
    • 2021-03-23
    • 2011-07-08
    • 2016-08-13
    • 1970-01-01
    • 2014-12-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-02
    相关资源
    最近更新 更多