I’ve been using an implementation of ViewManager in my applications (v6.8.x). Now that I’m exploring the use of Vaadin 7, I was trying to port at least part of one of those applications, and I’m having problems getting started. As mentioned in another post, the old LoginScreen didn’t work, so I’m building my own login page - no problem. But getting the first screen displayed is causing me trouble.
My original code looked like this:
@Override
public void init() {
Logger.info("myApp starting");
setTheme("myApp");
setAppTitle("myApp");
mainWindow = new Window("myApp");
mainWindow.setName("myApp");
setMainWindow(mainWindow);
// Initialize configuration properties
initProperties();
// Initialize the database manager
dbMgr = new dbManager(this);
// Initialize the view manager
viewManager = new ViewManager(mainWindow);
// Create login screen
viewManager.switchScreen(LoginScreen.class.getName(), new LoginScreen(this));
}
Several of those functions appear to have been deprecated. I’m trying it this way but my app starts with a blank screen instead of showing the login page. I’m guessing I’m forgetting something simple in the new startup scheme. Can someone help me jumpstart this? I figure once I get going, I should be ok… I hope
@Override
public void init(VaadinRequest request) {
Logger.info("myApp starting");
// setTheme("myApp");
setAppTitle("myApp");
mainWindow = new Window("myApp");
// mainWindow.setName("myApp");
// setMainWindow(mainWindow);
// Initialize configuration properties
initProperties();
// Initialize the database manager
dbMgr = new dbManager(this);
// Initialize the view manager
viewManager = new ViewManager(mainWindow);
// Create login screen
viewManager.switchScreen(LoginScreen.class.getName(), new LoginScreen(this));
}