How to navigate to login from anonymous user

I have a no login anon user and I’m trying to add a button to go back to the login page.
I looked at the urlRouting and tried this.

@Subscribe(“btnRegresar”)
public void onBtnRegresarClick(Button.ClickEvent event) {
AppLoginScreen build = screenBuilders.screen(this).withScreenClass(AppLoginScreen.class).build();
urlRouting.replaceState(build);
}

I’m getting a Caused by: java.lang.IllegalStateException: RootWindow does not have any configured work area.

I’m sure im doing something wrong.

Thank you for the constant help getting me out of trouble!

or maybe just navigating to https://google.com… or any url… any help pls?

Hi,

I’d recommend reading Anonymous Access to Screens docs. It seems that the standard functionality should suit you.

Regards,
Gleb

The login page already has anonymous access
I want to navigate
Locahost:8080/app/#anonpage
To
Locahost:8080/app/#login

Spasibo! Spasibo! Spasibo! Spasibo!
I forgot to put OpenMode ROOT

screenBuilders.screen(this).withScreenClass(AppLoginScreen.class)
.withOpenMode(OpenMode.ROOT).build().show();