I am migrating a custom implementation from table to the new grid component.
I was using the table.addGeneratedColumn feature, for generating a custom column with a Panel or a MenuBar inside.
I’m just looking to reproduce the same easily with the Grid, but i’m lost … I saw the chain with Data → Converter → Renderer, but no way to have a simple Panel renderer …
It seems to be possible with new Renderer but i’m finding so strange to have to use GWT compentnt and do the RPC links.
I don’t exactly know what you are doing with the Panel and MenuBar, but having Vaadin components in a rendered column sounds like there could be some trouble with that. Most of the current Vaadin components (other than Grid itself and some others) are not really designed to be used as standalone GWT widgets, so you there could be some issues with using them in that way. Normally, column renderers use normal GWT widgets or low-level DOM elements, which should be faster.
I used the column generator to dynamically display action buttons in the tbale rows.
Like that :
The “Actions” column is dynamic and in this case it was a MenuBar (previously a Panel with buttons).
The component MyTable listen events and throw custom events to the views !
I found the problem in my implementation. the presentation type in my client side renderer (VMyWidgetRenderer) has to be the same as column type. And it has to be a client side type.
I created an intermediate class to assign values from server side class MyWidget and used that type in Renderer.
It works with that.
But that doesn’t resolve my problem. My aim was to reuse the entire logic and the server side compoenents I already have.
Currently I am adding that in a Table and it works fine. But I can’t use those with Grid.
I think I will have to extend functionality of Vaadin Table to get some features like filtering in column header.