Wicket AjaxNewWindowNotifyingBehavior 和后退按钮

Wicket AjaxNewWindowNotifyingBehavior and back button

我正在使用 Wicket 6.x,但在使用 AjaxNewWindowNotifyingBehavior 时遇到了问题。

根据 Wicket 文档,它的作用如下:

An Ajax behavior that notifies when a new browser window/tab is opened with url to a page instance which is already opened in another window/tab in the same user session

基本上,它会在创建新 window/tab 时提醒您。

我的问题是它无法正常工作,因为它不仅在新 window/tab、 时触发,而且在用户按下浏览器的 "Back" 按钮时也会触发,这显然打乱了我的应用程序的逻辑。

如何避免这种情况?这是 Wicket 错误还是我做错了什么?以下是我的使用方法:

add(new AjaxNewWindowNotifyingBehavior("compila") {
    private static final long serialVersionUID = 1L;

    @Override
    protected void onNewWindow(AjaxRequestTarget target) {
        //Do whatever...
    }
});

有什么想法吗?有什么方法可以检测该行为是由于新选项卡而不是按下后退按钮而触发的吗?

这是 AjaxNewWindowNotifyingBehavior 中的错误:

它检测到一个新的 window,当一个 'old' 页面呈现为其原始 window 页面时,其名称同时被另一个页面更改。

https://issues.apache.org/jira/browse/WICKET-6479