【问题标题】:icefaces fileEntryicefaces 文件入口
【发布时间】:2013-02-26 09:38:59
【问题描述】:

我正在使用 ace:fileEntry 并且有 2 个问题:

  1. 我正在尝试更改样式,以便输入文件的区域(显示文件名的位置)更大。我怎样才能做到这一点?

  2. 我的组件工作正常,但是组件fileEntryListener上出现错误信息,为什么?

【问题讨论】:

    标签: jsf icefaces


    【解决方案1】:

    我找到了如何更改大小。

    Icefaces 忘记在 ace:fileEntry 组件中添加 'size' 属性,

    所以我们必须使用 javaScript 插入它。

    function openFilePanel() 
    {
         // find the component in the document
         var nodeList = document.getElementsByTagName("input");
         for(var i=0 ; i< nodeList.length;i++)
         {
             var  item =  nodeList[i];
             if(item.getAttribute("type") == "file") 
             { //  create and set the 'size' attribute  
                 item.setAttribute("size", "70");
                }
            }
    
    }
    

    如果您使用多个 ace:fileEntry 组件,您必须找到它以不同方式创建的“输入”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-02-12
      • 2014-09-07
      • 1970-01-01
      • 2012-10-12
      • 2011-01-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多