I have an application where I use multiple UIs:
https://github.com/steinarb/ukelonn/tree/using-vaadin
I have one UI for the users:
https://github.com/steinarb/ukelonn/blob/using-vaadin/ukelonn.bundle/src/main/java/no/priv/bang/ukelonn/impl/UkelonnUI.java
I have a different UI for the admins:
https://github.com/steinarb/ukelonn/blob/using-vaadin/ukelonn.bundle/src/main/java/no/priv/bang/ukelonn/impl/UkelonnAdminUI.java
There is a UI to handle login (Shiro-backed forms based authentication):
https://github.com/steinarb/ukelonn/blob/using-vaadin/ukelonn.bundle/src/main/java/no/priv/bang/ukelonn/impl/LoginUI.java
And finally there is a TopUI that just distributes requests to the appropriate UI:
https://github.com/steinarb/ukelonn/blob/using-vaadin/ukelonn.bundle/src/main/java/no/priv/bang/ukelonn/impl/TopUI.java
This works as long as everything starts normally, but when the server is reloaded and the UI isn’t ie. when the web page has a cookie the server knows nothing about reloading gets stuck and never completes.
Since a reload of the server happens everytime I rebuild the bundle with maven and the apache karaf server picks up the new version, having the UI stuck during reload happens annoyingly often during the development phase.
So I tried moving to a different model: having a single UI and instead of moving between UIs, moving between views.
Ie. the UI now contains the following content:
[code]
public class UkelonnUI extends AbstractUI {
private static final long serialVersionUID = 1388525490129647161L;
private Navigator navigator;
@Override
protected void init(VaadinRequest request) {
getPage().setTitle("Ukelønn");
navigator = new Navigator(this, this);
// Add all of the different views
navigator.addView("", new UserView(request));
navigator.addView("admin", new AdminView(request));
navigator.addView("login", new LoginView(request, navigator));
if (!isLoggedIn()) {
navigator.navigateTo("login");
} else if (isAdministrator()) {
navigator.navigateTo("admin");
} else {
navigator.navigateTo("");
}
}
}
[/code]with the UserView containing the code formerly found in the UkelonnUI, the AdminView containing code formerly found in the UkelonnAdminUI and the LoginView containing code formerly found in the LoginUI.
The LoginUI shows up as expected, but the two TabBarView-based views, UserView and AdminView only shows the tabs and not the content, ie. like the attached screenshot
Is it possible to use a TabBarView inside a view that has been navigated to?
Or do the TabBarView and the navigator used on the top level conflict?
Thanks!