Hello,
I’m trying to implement a custom Column Renderer for the Grid in Vaadin 8. Unfortunately the documentation is not reflecting recent changes in Vaadin 8, so the examples don’t compile (
https://vaadin.com/docs/-/part/framework/clientsidewidgets/clientsidewidgets-grid.html#clientsidewidgets.grid.renderers
).
Here is what I got right now:
Server Renderer:
[code]
public class CountryRenderer extends AbstractRenderer<Grid<?>, Country> {
private static final long serialVersionUID = 1L;
public CountryRenderer() {
super(Country.class);
}
}
[/code]Client Renderer:
[code]
public class CountryRenderer implements Renderer {
@Override
public void render(RendererCellReference cell, Country country) {
// Do nothing for test purposes
}
}
[/code]Connector:
[code]
@Connect(de.xxx.renderer.CountryRenderer.class)
public class CountryRendererConnector extends AbstractGridRendererConnector {
private static final long serialVersionUID = 1L;
@Override
public de.xxx.renderer.client.CountryRenderer getRenderer() {
return (de.xxx.renderer.client.CountryRenderer) super.getRenderer();
}
}
[/code]When I try to attach the renderer I get an empty Grid (no rows). After clicking around a bit Vaadin becomes unresponsive and crashes. As of yet I was not able to catch the error with Breakpoints.
Has anyone a suggestion how to implement a custom renderer in Vaadin 8 or any working example? I would much appreciate any hint regarding this topic.