My application has a “Main Window with side Menu” and I defined some icons to the menu items, like the next image:
It was working fine with platform-8.6.0, but after I upgraded to version 8.6.1 the icons are not showing any more and I get a couple of warnings:
WARN [http-nio-8080-exec-6/yfams/admin] com.haulmont.cuba.web.gui.icons.IconResolverImpl - There is no IconProvider for the given icon: branding/dashboard.png
If I go back to 6.8.0 it works again.
Do I have to change anything in the application or this could be a bug?
As a workaround I suggest that you create your own implementation of com.haulmont.cuba.web.gui.icons.IconProvider that will provide icons from custom folders. You can find more information about it in our documentation: link.
Here is a small example:
@Component
public class BrandingIconProvider implements IconProvider {
@Override
public Resource getIconResource(String iconPath) {
if (StringUtils.isEmpty(iconPath)) {
throw new IllegalArgumentException("Icon path should not be empty");
}
return new VersionedThemeResource(iconPath);
}
@Override
public boolean canProvide(String iconPath) {
return iconPath.startsWith("branding/");
}
}