net.sf.tacos.ajax.components
Class Autocompleter

java.lang.Object
  extended byorg.apache.hivemind.impl.BaseLocatable
      extended byorg.apache.tapestry.AbstractComponent
          extended bynet.sf.tacos.ajax.components.Autocompleter
All Implemented Interfaces:
IComponent, IDirect, IRender, org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder

public abstract class Autocompleter
extends AbstractComponent
implements IDirect

Autocompleteing helper component intended to be used with a TextField component to provide a searchable/selectable drop down list of choices for a form input text field.

Reference:Scriptaculous Ajax.Autocompleter

Author:
jkuhnert

Constructor Summary
Autocompleter()
           
 
Method Summary
abstract  AjaxDirectService getAjaxEngine()
          Injected AjaxDirect engine
abstract  String getInputId()
          Required component id of input field.
abstract  IActionListener getListener()
          Required listener for performing search
abstract  ListenerInvoker getListenerInvoker()
          Injected listener invoker
abstract  ListItemRenderer getListItemRenderer()
          List item renderer
abstract  Object getListSource()
          Required list item source parameter
abstract  IScript getScript()
          Autocompleter script
abstract  ValueConverter getValueConverter()
          Injected value converter
protected  void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
          
protected  void renderList(IMarkupWriter writer, IRequestCycle cycle)
          Invoked by renderComponent(IMarkupWriter, IRequestCycle) if the response from this request should be the returned value of whichever search was performed.
 void trigger(IRequestCycle cycle)
          
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, toString
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.IDirect
isStateful
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainer, setId, setNamespace, setPage, setProperty
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

Autocompleter

public Autocompleter()
Method Detail

getAjaxEngine

public abstract AjaxDirectService getAjaxEngine()
Injected AjaxDirect engine


getListenerInvoker

public abstract ListenerInvoker getListenerInvoker()
Injected listener invoker


getScript

public abstract IScript getScript()
Autocompleter script


getValueConverter

public abstract ValueConverter getValueConverter()
Injected value converter


getListener

public abstract IActionListener getListener()
Required listener for performing search


getInputId

public abstract String getInputId()
Required component id of input field. Can be component id or html input id


getListSource

public abstract Object getListSource()
Required list item source parameter


getListItemRenderer

public abstract ListItemRenderer getListItemRenderer()
List item renderer


renderComponent

protected void renderComponent(IMarkupWriter writer,
                               IRequestCycle cycle)


renderList

protected void renderList(IMarkupWriter writer,
                          IRequestCycle cycle)
Invoked by renderComponent(IMarkupWriter, IRequestCycle) if the response from this request should be the returned value of whichever search was performed.

Parameters:
writer -
cycle -

trigger

public void trigger(IRequestCycle cycle)

Specified by:
trigger in interface IDirect