Search code examples
vaadinvaadin10vaadin-flow

Vaadin Flow rerouting in HasUrlParameter#setParameter does not change URL?


My login view with @Route("login") implements HasUrlParameter<String> with the following lines:

@Override
public void setParameter(BeforeEvent event, @WildcardParameter String parameter) {
    event.rerouteTo(AnotherView.class);
}

The content of the AnotherView is shown when I call the login view but the URL remains from the login view, i.e. it is /login instead of /another-view. Is that works-as-designed? I would expect a history entry to be added in the browser with the new URL. How can I achieve that? Also, I tried ui.navigateTo instead of rerouting but that didn't do anything.


Solution

  • The issue is known on github project of Vaadin flow: https://github.com/vaadin/flow/issues/4189.