Is it possible to add link to table column when the column is generated in code.
Hi,
in fact it is. Just create a LinkButton through the ComponentFactory like this:
carsTable.addGeneratedColumn("colour", new Table.ColumnGenerator() {
@Override
public Component generateCell(Entity entity) {
LinkButton link = componentsFactory.createComponent(LinkButton.NAME);
// do your stuff with the link
return link;
}
});
Bye,
Mario
1 Like