Hi,
I have extended the existing theme to halo with the branding image and deployed the application but it failed to load the logo. I double-checked and it exists in the tomcat folder
/webapps/app/VAADIN/themes/halo/branding
I checked the console error and found out it looks for the image here:
http://localhost:8080/app/VAADIN/themes/hover/branding/test.png
why is the application looking for the hover theme even though I extended halo? possible bug?
cuba platform version : 7.2.2
message.properties:
application.logoImage = branding/test.png
loginWindow.logoImage = branding/test.png
Regards,
Sanchit
Pinyazhin
(Roman Pinyazhin)
April 6, 2020, 6:46am
#3
Hello,
The path to the branding image depends on the theme which application uses. If you want to use this image in all theme you can do the following:
place the image to all extend themes
place image to the web/VAADIN folder and slightly change code of extended LoginScreen:
@Override
protected void initLogoImage() {
logoImage.setSource(RelativePathResource.class).setPath("VAADIN/my-logo-image.png");
}
Hi Roman,
Thank you. This works for the application logo image.
How can I do the same for loginWindow logo image? It stills looks inside themes.
Regards,
Sanchit
Pinyazhin
(Roman Pinyazhin)
April 6, 2020, 11:07am
#6
The above code is just for loginWindow logo image. You should extend LoginScreen and add the following method with your image path:
@Override
protected void initLogoImage() {
logoImage.setSource(RelativePathResource.class).setPath("VAADIN/my-logo-image.png");
}
1 Like