I need an input field capable of taking tags with spaces in tagname like shown below:
I know that the <p:autoComplete multiple="true">
supports taking tags, but it uses space to separate tags:
I'd like to include space in the tagname and use ; or Enter to advance to next tag. How can I create a new custom component, or customize the <p:autoComplete>
for this? I'm using JSF 2.2 and PrimeFaces 3.2.
Why not rewrite/modify it's JavaScript functions (in autocomplete.js) ?
code & functions of interest :
bindStaticEvents
bindKeyEvents
bindDynamicEvents
Suggestions : Replace
key === keyCode.SPACE
withkey === 188
(which is the code for;
)Note : It might have some side effects, especially if you are using autocomplete somewhere else and differently..