Problem with Upload in Grid

I have a grid with an Upload in a ComponentRenderer column.
When I click on the Upload button I get a js error and a 404 Not Found for a …/VAADIN/dynamic/resource/xxxx/upload
When I click on it again, it works.

Looks like the problem is that when I click on the button I also “edit” the row, and when the editor is opened the renderer is called again, which recreates the button I’m clicking.

When I implement my own quick&dirty caching and return the same instance, it also works fine.
I see that my ComponentRenderer’ed Checkboxes are also recreated, but there I’ve not seen any ill effects.
Maybe Upload is an especially complex component.

So, not sure what to think about this one.

  • Why does the editor need to call the renderer at all? Isn’t the editor per-cell now?
  • Shouldn’t ComponentRenderer / Grid make sure to use the same instance?

I think I’ll work around this by creating a CachedComponentRenderer, but should I have to?