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

java.lang.Object
  extended by org.apache.wicket.behavior.Behavior
      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:
java.io.Serializable, IBehaviorListener, IClusterable, IComponentAwareEventSink, IRequestListener, IComponentAwareHeaderContributor
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  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  java.lang.String constructSettingsJS()
           
protected  void onBind()
          Subclasses should call super.onBind()
protected abstract  void onRequest(java.lang.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)
           
 
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, generateCallbackScript, getAjaxCallDecorator, getCallbackScript, getChannel, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, throttleScript
 
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
afterRender, bind, getCallbackUrl, getComponent, getStatelessHint, onComponentRendered, onComponentTag, onComponentTag
 
Methods inherited from class org.apache.wicket.behavior.Behavior
beforeRender, canCallListenerInterface, detach, isEnabled, isTemporary, onConfigure, onEvent, onException, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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(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 interface IComponentAwareHeaderContributor
Overrides:
renderHead in class AbstractDefaultAjaxBehavior
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 interface
response - Response object
See Also:
Behavior.renderHead(Component,org.apache.wicket.markup.html.IHeaderResponse)

constructSettingsJS

protected final java.lang.String constructSettingsJS()
Returns:
JS settings

onBind

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

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

onRequest

protected abstract void onRequest(java.lang.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


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