Suggestor

As known from many applications and websites, the FormEngine offers the possibility of presenting suggestions while input. A so called suggestor provides options basing on the current text input. Each suggestion can be selected for inserting into the text field.

For that purpose the TextRenderer, the AddTextRenderer, and the EditableOutputRenderer provide a parameter named suggestor for defining the suggestion generator. The generator must be a derivation of de.imatics.forms.type.TextSuggestor.

The FormEngine brings two implementations: the OptionListSuggestor the TreePathSuggestor. The first one uses an option list defined for the component. It filters the options, whose value starts with the current input text. If there are no results a contains search will be started on all options and those results will be presented as suggestions.

The TreePathSuggestor on the other hand uses the option tree of a component as source for its suggestions.

In the following example the input of a country name is expected. The list of possible countries used as suggestions is defined as option list with static options in the form definition. The suggestions are not case-sensitive.

Form
*