List with Html


I need a combobox, with html as element listed instead of plain text.
I found this ticket about it :

So, I tried using a subWindow, a textField and a Vertical Layout full of buttons :
(see screenshot, with and without focus).

But i’m not satisfied, it’s a cheap way to do it.
I want to know how you advise to do it a more proper/vaadin way?!

Thankx for your help

Without extend the client-side combobox, I don’t think it’s possible. Extending the widget would be the ‘correct way’, but be warned, it is quite difficult. Consider using e.g. a PopupButton with a Panel for scrolling.

Thanks for the answer.
Since i need a text field instead of a button, i’m trying to extend the widget. I encounter some issues since creating a widget on eclipse gave me a NPE (like this ticket :
), even on a new project, without maven in it.

Beside that, since textfield doesn’t have a Click Event as Button does, which Event should i use to open the popup ?

you could try onFocus, or whatever the comboBox uses when the user types in letters.

You would create color icons and use them in a combobox (
Combo box