[英]Primefaces autocomplete multiple with forceSelection false
我使用的是Primefaces 6.0,其中<p:autocomplete>
不適用於multiple=true
和forceSelection=false
。
您可以在下面找到組件:
<p:autoComplete value="#{bean.value}
multiple="true"
completeMethod="#{bean.completeTheme}"
forceSelection="false"/>
如何插入未列出的自定義值?
您始終可以在完整的方法中添加插入的自定義值,如下所示:
public List<String> completeMethod(String query) {
List<String> suggestions = new ArrayList();
suggestions.add(query);
//... add more suggestions
return suggestions;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.