What is the best way to create a ComboBox of names (when there can be duplicates such as John Smith)

I understand that duplicate items in the ComboBox is not supported but in this case how do you create a list of people? I ask because it’s very possible that two people will have the same name such as John Smith. What is the recommended way to handle this type of issue? The toString(), hashCode(), and equals() all correctly address it with a database unique ID number but the combobox uses the setItemLabelGenerator() to separate out items and if there’s two “John Smith” (person.getFirstname() + " " + person.getLastname()) then this will fail. In this case what is the recommended way of handling a list of people in a ComboBox?

I usually try to add more information, if the computer can’t make the difference between 2 John Smith how can the user pick the correct user?

You can also use a component like the lookup field: Lookup Field - Vaadin Add-on Directory or build your own

( so the user can search for John Smith and see multiple entries with their address)

This won’t fail in an upcoming version anymore, it’s fixed and to be released soon ish. It’s still hiiiighly recommended to have unique display names to improve UX and allow people to easily distinguish all possible options.

I’ve added additional information but it doesn’t always work unfortunately.

That’s good to hear. My understanding was that it wasn’t going to be resolved.

Thank you to both of you. Your help is appreciated.