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
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 |
---|---|
void |
detach(Component component)
Allows the behavior to detach any state it has attached during request processing.
|
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, onMethodMismatch, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind
beforeRender, canCallListener, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
rendersPage
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–2022 Apache Software Foundation. All rights reserved.