2013-11-25 33 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>