maxschuster / Vaadin-AutocompleteTextField

A Vaadin TextField with autocomplete (aka word completion) functionality
https://vaadin.maxschuster.eu/AutocompleteTextField/
Apache License 2.0
9 stars 6 forks source link

Provide way/suggestion how to add hidden ID to suggestion list and field #12

Closed markusweisssiemens closed 7 years ago

markusweisssiemens commented 7 years ago

Following scenario:

List and also selected entry should contain users and show something like:

firstname, lastname (department)

but for querying data and selecting data every user has an unique ID.

This ID should not be shown, but used inside the converter, because searching (e.g. in a database) by the display text is not a very good solution and even could have no unique result.

Do you have any suggestion how this can be done by extending / changing this component?

maxschuster commented 7 years ago

Hi,

This goes against the goal of this add-on. It's designed to behave like a normal TextField with a String as value.

Maybe you can use another add-on like AutocompleteField for Vaadin or Viritins LazyComboBox.

They both allow you to have a label connected to any object.