Hello,
I’ve got a root with a Navigator. The first page that is shown is a login form:
public void init(WrappedRequest request) {
SimpleViewDisplay display = new SimpleViewDisplay();
setContent(display);
// Navigator is instance variable with getter
navigator = new Navigator(Page.getCurrent(), display);
navigator.addView(LoginMainLayout.VIEW_NAME, LoginMainLayout.class);
// react to initial fragment, received before we created the Navigator
navigator.navigateTo(LoginMainLayout.VIEW_NAME);
When I try to get the root within my LoginForm the root is always null:
LoginForm login = new LoginForm();
login.addListener(new LoginForm.LoginListener() {
public void onLogin(LoginEvent event) {
... Root.getCurrent(); //--> null
I want to use the Navigator to navigate to the next page, if the login is succefull. How can I access the Navigator, when I do not get the root?
Or what is the best way to use the Navigator? In my opinion it should be accessibel from all components, shouldn’t it?
I’m using Vaadin Alpha 3.
Thanks.