daryn
(Daryn Leaity)
#1
Been looking through the docs and cannot see any examples.
Would like to be able to generate a column with HTML
e.g.
@Subscribe
protected void onInit(InitEvent event) {
notesTable.addGeneratedColumn(
"description",
this::renderHtmlDescription
)
}
daryn
(Daryn Leaity)
#2
Actually nevermind
Figured it out. Was trying to import the wrong Label class
@Subscribe
protected void onInit(InitEvent event) {
notesTable.addGeneratedColumn(
"description",
this::renderHtmlDescription
)
}
private Component renderHtmlDescription(Note note) {
Label label = componentsFactory.createComponent(com.haulmont.cuba.gui.components.Label.class);
label.setHtmlEnabled(true);
label.setValue(note.getComment());
return label;
}