Error with component renderer

Someone could tell me where is my error doing instance of ComponentRenderer? This is my code:

venditeGrid.addColumn(new ComponentRenderer(data → {
VerticalLayout vl = new VerticalLayout();
Label l1 = new Label(data.getValoreFormattata());
vl.add(l1);
Label l2 = new Label(data.getValoreApFormattata());
vl.add(l2);
return vl;
}))
.setKey(“valore”)
.setHeader(new Html(“<font face="SansSerif" size="4" color="#1676F3">” + “VALORE A.C./A.P.”));

The compiler error is:
Incorrect number of arguments for type ComponentRenderer<COMPONENT,SOURCE>; it cannot be parameterized with arguments

The compiler cannot deduce the type of ComponentRenderer as long as the syntax has errors. I guess your error is in during creation of Html component for the column header. Please try to remove the setHeader(..) part and check if the ComponentRenderer still shows up wrong.

The error in the Html component is the mix-up of double-quotes. You can for example use single quotes for inside the actual html code
new Html("<font face='SansSerif'>").

I’m also pretty sure the actual html code of yours is not valid too. In addition, I recommend not using Vaadins Html component, if you can also use a Span or a Div. Html has some drawbacks and issues.

Sorry but the error is referred to ComponentRenderer. I attach the screenshot of my eclipse with the error.
18301780.jpg

There exists no ComponentRenderer of just 1 type. either define both types (ComponentRenderer<VerticalLayout, SumDataConversion>), or just leave it empty so it will find the types itself (ComponentRenderer<>). The latter is usually preferred.

You are right! Thanks a lot.