DetailsGenerator doesn't get visible since Version 7.6.0

Since Vaadin 7.6.0 DetailsGenerators doesn’t get visible. The Problem is, that the setted DetailsGenerator gets replaced by an Proxy Class anyhow.

The Workarround is to set the DetailsGenerator in the Listener that should make the details visible / invisible. If you set it outside the Listener
it gets replaced by the framework somehow.

DetailsGenerator = new CustomDetailsGenerator();

Grid grJobOverview = new Grid();
grJobOverview.addItemClickListener(itemClickEvent → {

 Object itemId = itemClickEvent.getItemId();
 // Workarround
 grJobOverview.setDetailsGenerator(xFitImportDetailsGenerator);
 grJobOverview.setDetailsVisible(itemId, !grJobOverview.isDetailsVisible(itemId));

});

It would be nice if you (vaadin Team) could check it.

Best regrads

Benjamin

It helps, if you set the Detailsgenerator after adding the Container DataSource. Then it will not be replaced…

Can you check if the issue still exists in the brand new 7.6.2? I think something related to this was fixed.

cheers,
matti

Upgraded to 7.6.2. Setting the DetailsGenerator outside the Item Click listerner does not work. Moved the generator inside the listener and it works. Thanks Hans for pointing this out. Saved me hours of debugging.

Hi,

There was a change in Grid that moved the responsibility of the DetailsGenerator to another class and seems that the logic that was keeping it up to date with Container changes was not moved correctly. I’ll make a patch, it should go to 7.6.3.

//Teemu