public class AutocompleteHelper extends Object
Generates a response expected by our binding in the autocomplete templates.
Modifier and Type | Class and Description |
---|---|
static class |
AutocompleteHelper.Completion
Represents a suggestion or completion of a given keyword
|
static interface |
AutocompleteHelper.ItemSearch
Called to generate completions for a given query.
|
Modifier and Type | Field and Description |
---|---|
static String |
NEW_ENTRY_NLS_KEY
Can be used with
NLS.get(String) to obtain a "(new)" text to be used
in the "description" field |
Modifier and Type | Method and Description |
---|---|
static void |
handle(WebContext ctx,
AutocompleteHelper.ItemSearch search)
Handles the given request and generates the appropriate JSON as expected by the select2 binding.
|
public static final String NEW_ENTRY_NLS_KEY
NLS.get(String)
to obtain a "(new)" text to be used
in the "description" fieldpublic static void handle(WebContext ctx, AutocompleteHelper.ItemSearch search)
ctx
- the request to handlesearch
- the handler to generate suggestionsCopyright © 2018. All rights reserved.