hi,
I want to add Renderer in multiselectcombo box for replacing space and commas but i am getting issues because Renderer method is not present in multiselectcombo class ,so how can i use this functionality ?
private void getColumnDescriptionsForSelected(PluginIntf plugin, PluginIntf.PluginColumnDescription clazz) {
columnDescriptions.setRenderer(new ComponentRenderer<>(item -> {
Label name;
if (item.columnname.indexOf("_") > 0)
name = new Label(StringUtils.capitaliseAllWords(item.replaceAll("_", " ").toLowerCase().replaceAll(" description", "")));
else if (!item.columnname.matches("(.)([A-Z]
)“))
name = new Label(StringUtils.capitaliseAllWords(item.columnname.replaceAll(”\d+“, “”).replaceAll(”(.)([A-Z]
)“, “$1 $2”).replaceAll(” description", “”)));
else
name = new Label(StringUtils.capitaliseAllWords(item.columnname.replaceAll("\\d+", "").replaceAll("(.)([A-Z]
)“, “$1 $2”).replaceAll(” description", “”)));
System.out.println(“name komal =”+name);//here coming aacount id from select datapoint
name.setTitle(item.columndescription);
Div labels = new Div(name);
System.out.println(“labels komal =”+labels);//here coming aacount id from select datapoint
labels.getStyle().set(“display”, “flex”)
.set(“flexDirection”, “column”).set(“marginRight”, “10px”);
labels.getClassNames().set(“tooltip”, true);
return labels;
}));
columnDescriptions.setItems(
plugin.getColumnDescriptions().stream().
filter(p -> p.theclass.equals(clazz.theclass)).
sorted(Comparator.comparing(o -> o.columnname)).
collect(Collectors.toList()));
}