-
Notifications
You must be signed in to change notification settings - Fork 297
Autocomplete TagIt
martin-g edited this page Sep 5, 2011
·
3 revisions
This project is an integration between Apache Wicket and Tag It (http://aehlke.github.com/tag-it/) - an extension of JQuery UI autocomplete component.
Add an instance of org.wicketstuff.tagit.TagItTextField to your form. For example:
form.add(new TagItTextField<String>("tagit", Model.of("")) {
@Override
protected Iterable<String> getChoices(String input) {
return suggestService.getSuggestions(input);
}
});
TagItTextField.getChoices(String) method implementation should return a collection of possible choices for the passed input from the user.
After submit the form component value is a comma separated list of all chosen values.
To modify the default TagIt configuration you should override org.wicketstuff.tagit.TagItAjaxBehavior.getTagItConfig().