How to change the suggestion made by the richfaces combobox?

删除回忆录丶 提交于 2019-12-06 07:25:58

You can use <rich:suggestionBox> and define the custom autocomplete algorithm.

It's not possible with <rich:comboBox> directly, but if you extend it and define it as a custom component, it is possible, by overriding the encodeSuggestionValues() method of ComboBoxBaseRenderer (actually of ComboBoxRenderer)

luiggitama

If we want to use rich:comboBox with a better suggestion method (not only "begins with" but "contains" or "contains any") we could enhance it on the client-side (as I did)...

In this article I share my (working) approach:
Enhanced rich:comboBox: Values (not only Text) and RegExp Suggestions.

So please test it and let me know what you think.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!