in my app I have 2 types of client PF and PJ so when my user try to navigate to one view that ends with _pf, I change the app theme and if he try to navigate to one view that ends with _pj I change to another theme.
private boolean viewChangeListeners(ViewChangeListener.ViewChangeEvent evt) {
if(evt.getNewView() != null) {
if (evt.getViewName().endsWith("_pj")) {
setTheme(Especialidade.PJ.getTema());
} else{
setTheme(Especialidade.PF.getTema());
}
}
return true;
}
So I create one ViewChangeEvent method and in that method I verify the end and change the theme, So when my view are loaded I set the focus in a combobox. But when the theme changes my screen blink and I lost the focus (I think that is becuse the theme change are more slow then the view creation)
It`s possible to fix this?