org.apache.tapestry.dojo.form
Interface IAutocompleteModel

All Superinterfaces:
IPrimaryKeyConverter
All Known Implementing Classes:
DefaultAutocompleteModel

public interface IAutocompleteModel
extends IPrimaryKeyConverter

Defines the interface used by the Autocompleter component to filter and match values from a potentially large data set.

The roots of this model come from the IPropertySelectionModel interface, adding additional logic for filtering where the normal semantics of IPropertySelectionModel would be prohibitively expensive.

Author:
jkuhnert

Method Summary
 String getLabelFor(Object value)
          For the given value, provide a user friendly label that will be presented in a drop down selection list in the browser ui.
 List getValues(String filter)
          Expected to return a list of all possible values, filtering out values that match the specified String in the label representation of the value.
 
Methods inherited from interface org.apache.tapestry.components.IPrimaryKeyConverter
getPrimaryKey, getValue
 

Method Detail

getLabelFor

String getLabelFor(Object value)
For the given value, provide a user friendly label that will be presented in a drop down selection list in the browser ui.

Parameters:
value - The object to retrieve a label for.
Returns:
The label to use for the given value.

getValues

List getValues(String filter)
Expected to return a list of all possible values, filtering out values that match the specified String in the label representation of the value.

Parameters:
filter - The string to use to filter the values based on the label representation of objects.
Returns:
A filtered list of values. Expected to be in the full object form such that IPrimaryKeyConverter.getPrimaryKey(Object) can be called on each returned value.


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