Reputation: 145
I am using rich:select component in my xhtml page
My requirements are :
1) rich:select should be searchable. 2) But should show all elements in the list when clicking the down arrow, irrespective of the search string present.
For making component searchable, I set enableManualInput=true. But,when I search and select some value, and later click on the down arrow (the dropdown expand) it does not show all items in the Dropdown list, but shows only the item currently selected. What happens is, the value of the currently selected item is set as the search prefix.
I need to manually remove all characters on the search field and start searching again.
Is there a workaround for this? Where I want a dropdown of list and also should be able to search through the list. If this component does not support this functionality, is there another alternative component?
I use richfaces 4 and JSF 2.0
Thanks.
Upvotes: 1
Views: 806
Reputation: 6796
It is a bug in RichFaces: https://issues.jboss.org/browse/RF-11088
It is planned to be fixed in 4.5.0, meanwhile you can take a fix from the pull request: https://github.com/richfaces4/components/commit/79657a54c90e99bfa1fb5f42eab8bf6f29fc9091
Upvotes: 0
Reputation: 3884
You can have the value deleted each time the list is shown (i.e. when you click the input field or the button):
<rich:select id="select" value="#{bean.selectValue}" enableManualInput="true"
onlistshow="#{rich:component('select')}.setValue('')">
Upvotes: 2