<rich:select id="miDisabled" enableManualInput="false" value="bar">
<f:selectItem itemLabel="foo" itemValue="foo" />
<f:selectItem itemLabel="bar" itemValue="bar" />
</rich:select>
<rich:select id="miEnabled" enableManualInput="true" value="bar">
<f:selectItem itemLabel="foo" itemValue="foo" />
<f:selectItem itemLabel="bar" itemValue="bar" />
</rich:select>
Both rich:select
s have "bar"
value selected by default, but miDisabled
's dropdownlist has two available values "foo"
and "bar"
as expected, while miEnabled
's only have "bar"
: "foo"
disappeared...
Any other way to set a default value to a rich:select
component which has enableManualInput
set to true
?
But the default value is being set, isn't it?
With manual input enabled the dropdownlist is filtered by what you type in. If you want to show all items all the time you have to set clientFilterFunction
for rich:select
.
filter = function(discardTypedValue, item) {
return item;
}