2013-02-26 54 views
0

我使用王牌:FileEntry的,並有2個問題:ICEfaces的FileEntry的

  1. 我試圖改變樣式,以便輸入文件(該文件名是提交)的面積會更大。我怎樣才能做到這一點?

  2. 我的組件工作正常,但是組件fileEntryListener上有錯誤消息,爲什麼?

回答

0

我發現如何改變大小。

ICEfaces的忘了添加「大小」屬性王牌:FileEntry的組件,

,所以我們必須使用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組件,則必須找到它以不同方式創建的「輸入」。