Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
How to style items of viritin TypedSelect?
Hi.
I'm using viritins TypedSelect.
With setCaptionGenerator() I was able to supply the proper naming of the combo box items.
Now I need to add some item dependent styling.
The underlying ComboBox has a ItemStyleGenerator which should fit my need. But I find no way to set the ItemStyleGenerator into the underlying ComboBox. Is there any way to achive this?
Or is there an alternative way to set some styles per item?
Would be nice to get some help.
Bye,
Horst
Finally I extended TypedSelect and made the ComboBox available.
/**
* Gets the underlying combo box or null, if TypedSelect does use a ComboBox.
*
* @return the combo box or null
*/
public ComboBox getComboBox() {
if (getSelect() instanceof ComboBox) {
return (ComboBox) getSelect();
} else {
return null;
}
}
More a hack than a solution, perhaps this could be integrated in TypedSelect.