2013-11-25 32 views
0

我需要一個帶有豐富面孔的可編輯下拉菜單。這是我的代碼。Richfaces select元素不會渲染下拉菜單

<rich:select enableManualInput="true" defaultLabel="start typing for select"> 
    <f:selectItem itemLabel="label1" itemValue="iv1"/> 
    <f:selectItem itemLabel="label2" itemValue="iv2"/> 
</rich:select> 

上述代碼不顯示可編輯的下拉菜單。它只顯示一個輸入文本框,其中包含下面列出的項目。當我開始在文本框中輸入時,列表消失。

截圖:

Problem

是什麼原因造成這個問題?我用richfaces 4.3.2和4.3.4嘗試了這個。兩人都給了我同樣的問題。

回答

0

原來我在web.xml中有不正確的設置。以下配置的工作原理如下:

<context-param> 
     <param-name>org.richfaces.enableControlSkinning</param-name> 
     <param-value>true</param-value> 
    </context-param> 

    <context-param> 
     <param-name>org.richfaces.skin</param-name> 
     <param-value>classic</param-value> 
    </context-param>