Package org.apache.tapestry5.corelib.mixins

# Class Autocomplete

java.lang.Object
org.apache.tapestry5.corelib.mixins.Autocomplete

@Events("provideCompletions") @MixinAfter public class Autocomplete extends Object
A mixin for a text field that allows for autocompletion of text fields. This is based on Twttter typeahead.js version 0.10.5. The container is responsible for providing an event handler for event "providecompletions". The context will be the partial input string sent from the client. The return value should be an array or list of completions, in presentation order. e.g.

     String[] onProvideCompletionsFromMyField(String input)
     {
       return . . .;
     }

Component Parameters
Name | Type | Flags | Default | Default Prefix
--- | --- | --- | --- | ---
context | Object[] | Since 5.4 |  | prop
The context for the "providecompletions" event. This list of values will be converted into strings and included in the URI. The strings will be coerced back to whatever their values are and made available to event handler methods. The first parameter of the context passed to "providecompletions" event handlers will still be the partial string typed by the user, so the context passed through this parameter will be added from the second position on.
frequency | double |  |  | literal
Overrides the default check frequency for determining whether to send a server request. The default is .4 seconds.
maxSuggestions | int |  | 5 | prop
Maximum number of suggestions shown in the UI. It maps to Typeahead's "limit" option. Default value: 5.
minChars | int |  |  | literal
Overwrites the default minimum characters to trigger a server round trip (the default is 1).
tokens | String |  |  | literal
If given, then the autocompleter will support multiple input values, seperated by any of the individual characters in the string.

Component Events
Name | Description
--- | ---
provideCompletions |

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Autocomplete()`

- ## Method Summary

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Autocomplete

    public Autocomplete()