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
 Map filterValues(String match)
          Used to filter a potentially large list of objects.
 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.
 
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.

filterValues

Map filterValues(String match)
Used to filter a potentially large list of objects.

Parameters:
match - The given partial string that should be matched against object labels in the model being managed.
Returns:
A Map containing key/value pairs matching the given input label string. The map should contain a key compatible with IPrimaryKeyConverter.getPrimaryKey(Object) and value compatible with getLabelFor(Object).


Copyright © 2006 Apache Software Foundation. All Rights Reserved.