org.wicketstuff.scriptaculous.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.wicketstuff.scriptaculous.ScriptaculousAjaxBehavior
                  extended by org.wicketstuff.scriptaculous.autocomplete.AbstractAutocompleteBehavior
All Implemented Interfaces:
java.io.Serializable, org.apache.wicket.behavior.IBehavior, org.apache.wicket.behavior.IBehaviorListener, org.apache.wicket.IClusterable, org.apache.wicket.IRequestListener, org.apache.wicket.markup.html.IHeaderContributor
Direct Known Subclasses:
AjaxAutocompleteBehavior, AutocompleteBehavior

public abstract class AbstractAutocompleteBehavior
extends ScriptaculousAjaxBehavior

support class for all autocomplete behaviors. This class is responsible for:

Subclasses of this behavior are responsible for implementing the way in which results are looked up. This can be a static list of results, or an ajax callback.

Author:
Ryan Sonnek
See Also:
http://wiki.script.aculo.us/scriptaculous/show/Autocompletion, Serialized Form

Field Summary
 
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
 
Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener
INTERFACE
 
Constructor Summary
AbstractAutocompleteBehavior()
           
 
Method Summary
protected  void addOption(java.lang.String key, java.lang.Object value)
           
protected abstract  java.lang.String getAutocompleteType()
          subclasses need to declare the scriptaculous autocomplete type.
protected  org.apache.wicket.ResourceReference getCss()
          extension point to customize what css is used to style the component.
protected abstract  java.lang.String getThirdAutocompleteArgument()
          Subclasses need to define this optional argument.
protected  void onBind()
           
protected  void onComponentRendered()
          render a placeholder div for the autocomplete results.
 
Methods inherited from class org.wicketstuff.scriptaculous.ScriptaculousAjaxBehavior
newJavascriptBindingBehavior, renderHead
 
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, generateCallbackScript, getAjaxCallDecorator, getCallbackScript, getCallbackScript, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, respond, throttleScript
 
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
bind, getCallbackUrl, getCallbackUrl, getComponent, getImplementationId, getStatelessHint, onComponentTag, onComponentTag, onRendered, onRenderHeadContribution, onRenderHeadInitContribution
 
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior
afterRender, beforeRender, cleanup, detach, detachModel, exception, isEnabled, isTemporary, onException, rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAutocompleteBehavior

public AbstractAutocompleteBehavior()
Method Detail

onBind

protected void onBind()
Overrides:
onBind in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior

onComponentRendered

protected void onComponentRendered()
render a placeholder div for the autocomplete results.

Overrides:
onComponentRendered in class org.apache.wicket.behavior.AbstractAjaxBehavior

getCss

protected org.apache.wicket.ResourceReference getCss()
extension point to customize what css is used to style the component.

Returns:

getAutocompleteType

protected abstract java.lang.String getAutocompleteType()
subclasses need to declare the scriptaculous autocomplete type.

Returns:

getThirdAutocompleteArgument

protected abstract java.lang.String getThirdAutocompleteArgument()
Subclasses need to define this optional argument. each implementation requires a different value.

Returns:

addOption

protected void addOption(java.lang.String key,
                         java.lang.Object value)


Copyright © 2006-2011 Wicket Stuff. All Rights Reserved.