org.apache.wicket.extensions.ajax.markup.html.autocomplete
Class AbstractAutoCompleteBehavior

java.lang.Object
  extended by org.apache.wicket.behavior.AbstractBehavior
      extended by org.apache.wicket.behavior.AbstractAjaxBehavior
          extended by org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
              extended by org.apache.wicket.extensions.ajax.markup.html.autocomplete.AbstractAutoCompleteBehavior
All Implemented Interfaces:
Serializable, IBehavior, IBehaviorListener, IComponentConfigurationBehavior, IClusterable, IRequestListener, IHeaderContributor
Direct Known Subclasses:
AutoCompleteBehavior

public abstract class AbstractAutoCompleteBehavior
extends AbstractDefaultAjaxBehavior

Since:
1.2
Author:
Janne Hietamäki (jannehietamaki)
See Also:
Serialized Form

Field Summary
protected  boolean preselect
          Deprecated. 
protected  AutoCompleteSettings settings
           
 
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
 
Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener
INTERFACE
 
Constructor Summary
AbstractAutoCompleteBehavior()
          Constructor that creates an default AutoCompleteSettings
AbstractAutoCompleteBehavior(AutoCompleteSettings settings)
          Constructor
 
Method Summary
protected  String constructSettingsJS()
           
protected  void onBind()
          Subclasses should call super.onBind()
protected abstract  void onRequest(String input, RequestCycle requestCycle)
          Callback for the ajax event generated by the javascript.
 void renderHead(IHeaderResponse response)
          Render to the web response whatever the component wants to contribute to the head section.
protected  void respond(AjaxRequestTarget target)
           
 
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, generateCallbackScript, getAjaxCallDecorator, getCallbackScript, getCallbackScript, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, throttleScript
 
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
bind, getCallbackUrl, getCallbackUrl, getComponent, getImplementationId, getStatelessHint, onComponentRendered, onComponentTag, onComponentTag, onRendered, onRenderHeadContribution, onRenderHeadInitContribution
 
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior
afterRender, beforeRender, cleanup, detach, detachModel, exception, isEnabled, isTemporary, onConfigure, onException, rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

preselect

@Deprecated
protected boolean preselect
Deprecated. 
Use AutoCompleteSettings.setPreselect(boolean)


settings

protected AutoCompleteSettings settings
Constructor Detail

AbstractAutoCompleteBehavior

public AbstractAutoCompleteBehavior()
Constructor that creates an default AutoCompleteSettings


AbstractAutoCompleteBehavior

public AbstractAutoCompleteBehavior(AutoCompleteSettings settings)
Constructor

Parameters:
settings - settings for the autocomplete list
Method Detail

renderHead

public void renderHead(IHeaderResponse response)
Description copied from interface: IHeaderContributor
Render to the web response whatever the component wants to contribute to the head section. TODO: Post 1.3, add component parameter, so that the behaviors dont' have to track component instances

Specified by:
renderHead in interface IHeaderContributor
Overrides:
renderHead in class AbstractDefaultAjaxBehavior
Parameters:
response - Response object
See Also:
AbstractDefaultAjaxBehavior.renderHead(org.apache.wicket.markup.html.IHeaderResponse)

constructSettingsJS

protected final String constructSettingsJS()

onBind

protected void onBind()
Description copied from class: AbstractDefaultAjaxBehavior
Subclasses should call super.onBind()

Overrides:
onBind in class AbstractDefaultAjaxBehavior
See Also:
AbstractDefaultAjaxBehavior.onBind()

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 far
requestCycle - current request cycle

respond

protected void respond(AjaxRequestTarget target)
Specified by:
respond in class AbstractDefaultAjaxBehavior
Parameters:
target - The AJAX target
See Also:
AbstractDefaultAjaxBehavior.respond(org.apache.wicket.ajax.AjaxRequestTarget)


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.