I’m using Vaadin 7 session management mechanism. So, I’ve this class:
public class YeWebApp extends UI {
@Override
protected void init(VaadinRequest request) {
// Authentication: check if user is found, otherwise send to login page
UserSession userSession = (UserSession) YeWebApp.getUserSession();
if (userSession == null) {
VaadinSession.getCurrent().setAttribute("yeWebApp", this);
getCurrentApp().setContent(new CssLayout());
initBeans();
initLogin();
} else {
CssLayout content = ((CssLayout) getCurrentApp().getContent());
if (content != null) {
content.removeAllComponents();
}
getCurrentApp().mainLayout.buildView();
setContent(getCurrentApp().getContent());
}
}
And that’s working fine. But, if I refresh my Application with F5 or open a new tab and try to enter in a window using this method:
public void showPopupWindow(PopupWindow window) {
YeWebApp.getCurrentApp().getUI().addWindow(window);
}
The Window just don’t show. It’s like my App have lost the UI reference or something like that, the code executes fine, but don’t display any window after the refresh.
What is wrong?
Regards,