0

フィルターをオンにしたメニューがあります。値とラベルはどちらも文字列です。この場合、「コンバーター」プロパティを設定する必要がありますか? 私が尋ねている理由は、「コンバーター」が提供されていないとフィルター機能が機能しないためです。例えば、

<p:selectOneMenu value="#{menuBean.selectedCountry}" filter="true" filterMatchMode="startsWith">
    <f:selectItem itemLabel="Select One" itemValue=""/>
    <f:selectItem itemLabel="US" itemValue="1"/>
    <f:selectItem itemLabel="Spain" itemValue="2"/>
</p:selectOneMenu>

あなたのポイントと助けをありがとう!

4

1 に答える 1

0

You didn't specify your primefaces version but this is a bug in 3.4. You can set the height attribute of p:selectOneMenu or you can apply the following fix from here. SelectOneMenu with filter not working with less than 10 elements.

于 2013-03-04T07:26:54.003 に答える