Reputation: 1732
I'm using Primefaces 6.0, in which <p:autocomplete>
doesn't work with multiple=true
and forceSelection=false
.
You can find the component below:
<p:autoComplete value="#{bean.value}
multiple="true"
completeMethod="#{bean.completeTheme}"
forceSelection="false"/>
How can I insert a custom value not listed?
Upvotes: 1
Views: 1116
Reputation: 425
You can always add your inserted custom value in your complete method, like this:
public List<String> completeMethod(String query) {
List<String> suggestions = new ArrayList();
suggestions.add(query);
//... add more suggestions
return suggestions;
}
Upvotes: 4