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.
ComponentRenderer setup and basics steps
Hi all,
i'm fairly new to vaadin and right now i'm trying to use this addon:
https://vaadin.com/directory#!addon/componentrenderer
which i found to be perfect for what i want to achieve in my application.
However, i have some trouble to make it work properly:
Basically, based on what i've found on the demo, i did setup a classic vaadin Grid
Grid gridExemple = new Grid();
ComponentCellKeyExtension.extend(gridExemple);
FocusPreserveExtension focusPreserveExtension = FocusPreserveExtension.extend(gridExemple);
DetailsKeysExtension.extend(gridExemple);
and a container with generated properties:
GeneratedPropertyContainer gpc = new GeneratedPropertyContainer(container);
gridExemple.setContainerDataSource(gpc);
then i specified also a generated column for the grid
gpc.addGeneratedProperty("TEST", new PropertyValueGenerator<Component>() {
@Override
public Component getValue(Item item, Object itemId, Object propertyId) {
HorizontalLayout mainLayout = new HorizontalLayout();
Button b = new Button("test");
b.setWidth(30, Unit.PIXELS);
b.setHeight(20, Unit.PIXELS);
mainLayout.addComponent(b);
return mainLayout;
}
@Override
public Class<Component> getType() {
return Component.class;
}
});
and, finally, i setup the ComponentRenderer renderer for that column
gridExemple.getColumn("TEST").setRenderer(new ComponentRenderer());
Now, the problem is that the renderer does not work, because the TEST column disappears from the grid. Without the .setRenderer method, however, the column appears and renders the java Object in the cell of each element of the container. (Each other column of the container shows fine)
So, i wonder how to use properly this addon. Am i doing the setup in the wrong way?
Also, Is it necessary to compile the widgetset inside the componentrenderer jar in my application Vaadin folder?
Thank you very much