I want to set a own favicon. To do that I have put my favicon.ico into my theme directory. If I set the theme by sepcifying @Theme(“mytheme”) this works. Also the right favicon is set.
But if I set the theme by calling UI.setTheme(“mytheme”) the default Vaadin favicon is displayed.
//@Theme("mytheme") <--- this works
@PreserveOnRefresh
@Push
public class DocFlowUI extends UI {
@Override
public void init(VaadinRequest request) {
setTheme("docFlow");
...
}
...
}
There should theoretically be no difference between the methods when it comes to favicons
In your coding you wrote @Theme(“mytheme”) but in setTheme you have “docFlow”. Is this just a copy-paste error or might this be the problem.
Ok. I have now a simple test project (for eclipse luna) attached. In the test project I have add a theme “mytheme”. The theme has a own favicon (a red box). If I specify the theme with @Theme in the VaddintestUI it works. If I specify the theme with setTheme(“mytheme”) it doesnt work.
I have also figured out that the firefox is very strange if a favicon was changed. Anywhere the firefox will have (may be) a old favicon in the cache. Also clearing the cache of Firefox and restart jboss will not help (not sure why …). But with chrome and opera (IE not testet) I can reproduce this behaviour.
Please note also that I have removed all jar’s from WEB-INF/lib/ because otherwise the attached file will be too big …
Is this a bug or is anything wrong in my test project? 17410.gz (500 KB)