Add link in table columns when using generated column

Is it possible to add link to table column when the column is generated in code.


in fact it is. Just create a LinkButton through the ComponentFactory like this:

carsTable.addGeneratedColumn("colour", new Table.ColumnGenerator() {
        public Component generateCell(Entity entity) {
            LinkButton link = componentsFactory.createComponent(LinkButton.NAME);
           // do your stuff with the link
            return link;


1 Like