Class AbstractAutoCompleteBehavior
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.apache.wicket.behavior.AbstractAjaxBehavior
-
- org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
-
- org.apache.wicket.extensions.ajax.markup.html.autocomplete.AbstractAutoCompleteBehavior
-
- All Implemented Interfaces:
Serializable
,IComponentAwareEventSink
,IRequestListener
,IComponentAwareHeaderContributor
,IClusterable
- Direct Known Subclasses:
AutoCompleteBehavior
public abstract class AbstractAutoCompleteBehavior extends AbstractDefaultAjaxBehavior
- Since:
- 1.2
- Author:
- Janne Hietamäki (jannehietamaki)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ResourceReference
AUTOCOMPLETE_JS
protected AutoCompleteSettings
settings
-
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
-
-
Constructor Summary
Constructors Constructor Description AbstractAutoCompleteBehavior()
Constructor that creates an defaultAutoCompleteSettings
AbstractAutoCompleteBehavior(AutoCompleteSettings settings)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
constructSettingsJS()
protected abstract void
onRequest(String input, RequestCycle requestCycle)
Callback for the ajax event generated by the javascript.void
renderHead(Component component, IHeaderResponse response)
Render to the web response whatever the component wants to contribute to the head section.protected void
respond(AjaxRequestTarget target)
protected void
updateAjaxAttributes(AjaxRequestAttributes attributes)
Gives a chance to the specializations to modify the attributes.-
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onMethodMismatch, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes
-
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind
-
Methods inherited from class org.apache.wicket.behavior.Behavior
beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.IRequestListener
rendersPage
-
-
-
-
Field Detail
-
AUTOCOMPLETE_JS
public static final ResourceReference AUTOCOMPLETE_JS
-
settings
protected AutoCompleteSettings settings
-
-
Constructor Detail
-
AbstractAutoCompleteBehavior
public AbstractAutoCompleteBehavior()
Constructor that creates an defaultAutoCompleteSettings
-
AbstractAutoCompleteBehavior
public AbstractAutoCompleteBehavior(AutoCompleteSettings settings)
Constructor- Parameters:
settings
- settings for the autocomplete list
-
-
Method Detail
-
renderHead
public void renderHead(Component component, IHeaderResponse response)
Description copied from class:Behavior
Render to the web response whatever the component wants to contribute to the head section.- Specified by:
renderHead
in interfaceIComponentAwareHeaderContributor
- Overrides:
renderHead
in classAbstractDefaultAjaxBehavior
- Parameters:
component
- component which is contributing to the response. This parameter is here to give the component as the context for component-awares implementing this interfaceresponse
- Response object- See Also:
Behavior.renderHead(Component, org.apache.wicket.markup.head.IHeaderResponse)
-
constructSettingsJS
protected final String constructSettingsJS()
- Returns:
- JS settings
-
onRequest
protected abstract void onRequest(String input, RequestCycle requestCycle)
Callback for the ajax event generated by the javascript. This is where we need to generate our response.- Parameters:
input
- the input entered so farrequestCycle
- current request cycle
-
respond
protected void respond(AjaxRequestTarget target)
- Specified by:
respond
in classAbstractDefaultAjaxBehavior
- Parameters:
target
- The AJAX target
-
updateAjaxAttributes
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
Description copied from class:AbstractDefaultAjaxBehavior
Gives a chance to the specializations to modify the attributes.- Overrides:
updateAjaxAttributes
in classAbstractDefaultAjaxBehavior
-
-