# Select2tokenizer

(part of package '[Servoy Extra Components](/reference/servoyextensions/packages/ui-component-packages/servoy-extra-components.md)')\
Extends designtime/SolutionModel: [JSWebComponent](/reference/servoycore/dev-api/solutionmodel/jswebcomponent.md)\
Extends runtime: [RuntimeWebComponent](/reference/servoycore/dev-api/forms/runtimeform/elements/runtimewebcomponent.md)

A Servoy Extra Component that provides a tokenized select input field with auto-complete and multi-selection capabilities.

This is a reference page; many components have detailed usage guides [here](https://docs.servoy.com/guides/develop/application-design/ui-components).

## Properties

### allowNewEntries

When true, new entries can be added that are not present in the value list. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### clearSearchTextOnSelect

When true, the search text is cleared after an option is selected. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### closeOnSelect

When true, the dropdown closes after an option is selected. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: true

***

### containSearchText

When true, only options containing the search text are displayed. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### dataProviderID

Bound data provider identifier for the tokenized select input value. Type: [Dataprovider](/reference/servoy-developer/component_and_service_property_types.md#dataprovider)

***

### editable

Flag indicating whether the component is editable. Type: [Protected](/reference/servoy-developer/component_and_service_property_types.md#protected) Default Value: true

***

### enabled

Flag indicating whether the component is enabled for user interaction. Type: [Enabled](/reference/servoy-developer/component_and_service_property_types.md#protected) Default Value: true

***

### hideSelectedItems

Flag indicating whether selected items should be hidden from the dropdown list after being chosen. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### location

Position of the component on the form. Type: [Point](https://github.com/Servoy/gitbook/blob/master/reference/servoycore/dev-api/js-lib/point.md)

***

### maximumSelectionSize

Maximum number of options that can be selected. Type: [Number](/reference/servoycore/dev-api/js-lib/number.md)

***

### noMatchesFoundText

Text displayed when no matching options are found. Type: [Tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring) Default Value: "No matches found"

***

### openOnUnselect

When true, the dropdown opens automatically when an item is unselected. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: true

***

### overlayMode

Flag indicating whether the overlay mode will be applied when the dropdown list opens. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: true

***

### placeholderText

Placeholder text displayed when no option is selected. Type: [Tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring) Default Value: "Select..."

***

### readOnly

Flag indicating whether the component is read-only. Type: [Protected](/reference/servoy-developer/component_and_service_property_types.md#protected) Default Value: false

***

### searchingText

Text displayed while searching for options. Type: [Tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring) Default Value: "Searching\u2026"

***

### selectOnClose

When true, an option is automatically selected when the dropdown is closed. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### styleClass

CSS style classes applied to the component. Type: [Styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass) Default Value: "select2-sm"

***

### tabSeq

Tab sequence order for keyboard navigation. Type: [Tabseq](/reference/servoy-developer/component_and_service_property_types.md#tabseq)

***

### toolTipText

Tooltip text displayed when hovering over the component. Type: [Tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring)

***

### valuelistConfig

Configuration for the value list. Type: [ValuelistConfig](/reference/servoy-developer/component_and_service_property_types.md#valuelistConfig)

***

### valuelistID

Identifier for the value list providing available options. Type: [Valuelist](/reference/servoy-developer/component_and_service_property_types.md#valuelist) Default Value: "autoVL"

***

### visible

Flag indicating whether the component is visible. Type: [Visible](/reference/servoy-developer/component_and_service_property_types.md#visible) Default Value: true

***

## Events

### onDataChangeMethodID(oldValue,newValue,event)

Called when the value changes.

**Parameters:**

> * {[${dataproviderType}](/reference/servoy-developer/component_and_service_property_types.md#dataprovider)} oldValue The previous value from the data provider.
> * {[${dataproviderType}](/reference/servoy-developer/component_and_service_property_types.md#dataprovider)} newValue The new value to be set.
> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object associated with the data change.

**Returns:** {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)}

***

### onFocusGainedMethodID(event)

Called when the component gains focus.

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the focus gained event.

***

### onFocusLostMethodID(event)

Called when the component loses focus.

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the focus lost event.

***

## API

### requestFocus(mustExecuteOnFocusGainedMethod)

Request the focus to this field.

**Example:**

```js
myElement.requestFocus();
```

**Parameters:**

> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} \[mustExecuteOnFocusGainedMethod] If false will not execute the onFocusGained method; the default value is true

***

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.servoy.com/reference/servoyextensions/ui-components/input-control/select2tokenizer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
