I’m trying to set style on the cells of a grid. I’m able to add a class name with setClassNameGenerator but all class style must be defined in the component template ?
I don’t want to set that in the template, is it possible to add it dynamically from java ?
Instead of injecting the style dynamically with Java code, which is not supported “directly” in Vaadin 14 (there is low level API to it), it is recommended that you incude it in a .css file and import it with the @CssImport instead.
Why do you want to dynamically inject the style ? Just trying to understand the use case.
Because several property are defined by the user on my app and I cannot predefined so much property.
I think I can forge a style attribute with a Renderer but I’m a bit lost