本文介绍了如何从模态窗口调用检票setResponsePage()的时候打败浏览器对话框弹出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从检票口试图setResponsePage()时,每低于modalWindow如何打败IE和Firefox对话框弹出。弹出对话框要求一个答案:这页要求您确认是否要离开 - 您输入可能无法保存数据

How to defeat IE and Firefox dialog popup when trying to setResponsePage() from a wicket modalWindow per below. Dialog popup demands an answer to: "This page is asking you to confirm that you want to leave - data you have entered may not be saved."

    AjaxLink signInContainer = new AjaxLink("signInContainer") {
        @Override
        public void onClick(AjaxRequestTarget target) {
            target.appendJavascript("Wicket.Window.unloadConfirmation = false;");

            modalWindow.close(target);
            setResponsePage(SignInPage.class);
            modalWindow.close(target);
        }
    };

推荐答案

在检票口6.x中你可以设置showUnloadConfirmation为false:

In wicket 6.x you can simply set showUnloadConfirmation to false:

final ModalWindow modalWindow = new ModalWindow("modalWindow");
modalWindow.showUnloadConfirmation(false);

这篇关于如何从模态窗口调用检票setResponsePage()的时候打败浏览器对话框弹出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 01:56