T
- public abstract class AutoCompleteBehavior<T> extends AbstractAutoCompleteBehavior
AbstractAutoCompleteBehavior
by introducing the concept of
a IAutoCompleteRenderer
to make response writing easier.IAutoCompleteRenderer
,
Serialized FormAUTOCOMPLETE_JS, settings
INDICATOR
INTERFACE
Constructor and Description |
---|
AutoCompleteBehavior(IAutoCompleteRenderer<T> renderer)
Constructor
|
AutoCompleteBehavior(IAutoCompleteRenderer<T> renderer,
AutoCompleteSettings settings)
Constructor
|
AutoCompleteBehavior(IAutoCompleteRenderer<T> renderer,
boolean preselect)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected abstract Iterator<T> |
getChoices(String input)
Callback method that should return an iterator over all possible choice objects.
|
protected void |
onRequest(String val,
RequestCycle requestCycle)
Callback for the ajax event generated by the javascript.
|
constructSettingsJS, renderHead, respond, updateAjaxAttributes
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind
beforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException, onRemove
public AutoCompleteBehavior(IAutoCompleteRenderer<T> renderer)
renderer
- renderer that will be used to generate outputpublic AutoCompleteBehavior(IAutoCompleteRenderer<T> renderer, boolean preselect)
renderer
- renderer that will be used to generate outputpreselect
- highlight/preselect the first item in the autocomplete list automaticallypublic AutoCompleteBehavior(IAutoCompleteRenderer<T> renderer, AutoCompleteSettings settings)
renderer
- renderer that will be used to generate outputsettings
- settings for the autocomplete listprotected final void onRequest(String val, RequestCycle requestCycle)
AbstractAutoCompleteBehavior
onRequest
in class AbstractAutoCompleteBehavior
val
- the input entered so farrequestCycle
- current request cycleprotected abstract Iterator<T> getChoices(String input)
input
- current inputCopyright © 2006–2021 Apache Software Foundation. All rights reserved.