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.
Ways to handling specific html tags instead of combobox generated span tags
Hi,
My aim is to create "complex" combobox items like we can see in this example : http://adresse.data.gouv.fr/map/
The generated column are well modified using css tricks.
So i tried to look at custom component connector described in doc, but I understand, that the generated client object for comboboxes items is a VFilterSelect wich use this code for render items captions in td/tr
@Override
public String getDisplayString() {
final StringBuffer sb = new StringBuffer();
final Icon icon = client.getIcon(client
.translateVaadinUri(untranslatedIconUri));
if (icon != null) {
sb.append(icon.getElement().getString());
}
String content;
if ("".equals(caption)) {
// Ensure that empty options use the same height as other
// options and are not collapsed (#7506)
content = " ";
} else {
content = WidgetUtil.escapeHTML(caption);
}
sb.append("<span>" + content + "</span>");
return sb.toString();
}
As you can see, VFilterSelect create hard coded spans, and hard coded escaped htmls
Is there ways to
- - create a custom VFilterSelect that is not creating spans ? but div ?
- - create a custom VFilterSelect that does not call WidgetUtil.escapeHTML()
- - create some ugly js magic voodoo trick to 1/ "on-the-fly" get escaped html characters 2/ unescape 3/ let the CSS do the job ?
Or
- Is there a method like setAllowedHtmlForCaption() but for items captions ?
Thanks for your time,
Regards,
Fabrice,