LoginScreen的onAfterShow事件触发问题

我扩展了LoginScreen,并增加了onAfterShow事件,发现这个事件在某种条件下只会触发一次,而不是每次都触发。

不触发onAfterShow的操作步骤:
1.浏览器打开新标签页,并输入登录地址 http://localhost:9080/app/?p1=abc,此时触发onAfterShow事件
2.刷新浏览器标签页,此时不触发onAfterShow事件
3.手动修改标签页地址为 http://localhost:9080/app/?p1=123,此时依旧不触发onAfterShow事件

触发onAfterShow的操作步骤:
1.浏览器打开新标签页,并输入登录地址 http://localhost:9080/app/?p1=abc,此时触发onAfterShow事件
2.手动关闭当前标签页,并打开新标签页,输入http://localhost:9080/app/?p1=123,此时也能触发onAfterShow事件

请问如何在不关闭浏览器标签页的情况下,每次刷新或者输入新url的时候能触发onAfterShow事件

给界面注册一个路由应该能实现这个功能,比方说 url 参数变化时加载 after show。

设置路由后,需要重新启动应用程序才能生效。

没看懂怎么用,能举个例子不?

代码就是添加了 @Route 注解:

@UiController("login")
@UiDescriptor("ext-login-screen.xml")
@Route("login")
public class ExtLoginScreen extends LoginScreen {
    @Subscribe
    public void onAfterShow1(AfterShowEvent event) {
        super.onAfterShow(event);
        notifications.create().withDescription("extended after show").show();
    }
}

可以在手动修改标签页地址的时候触发 onAfterShow

我按照这种格式修改了代码后,发现还是只能在标签页第一次打开的时候触发,修改标签页地址栏后回车依然没有触发这个事件