This is how I have done it in the past (sorry for Groovy)
In the init method: pricesTable.setIconProvider(new CustomIconProvider<Price>())
In the controller
/**
* An inner class that provides an error icon to the table when the row has an error.
* Usually we would use an anonymous class but it is confusing constructing
* a non static inner class in Groovy.
*/
class CustomIconProvider extends IconProvider<Price>
{
@Nullable
@Override
public String getItemIcon(Price price) {
return price.hasError() ? "font-icon:WARNING" : null
}
}
Currently, in order to use CubaIcon as a content of a generated column, you need to implement a custom renderer. I admit that this is inconvenient and I created a GitHub issue.
Thanks Gleb,
at the moment i used a component generated column with a label where i set the icon.
I will change to the new Renderer when will be released.
Kind regards
Actually, this issue was implemented for 7.1, since it’s not a bug but a feature. Unfortunately, we have no plans to backport it. Nevertheless, you can use our code as a foundation for your own implementation for 6.10+ version.