模態窗口如果您關閉使用檢票ModalWindows當窗口,你得到這個消息:改變unloadConfirmation消息中的Apache Wicket的
"Reloading this page will cause modal window to disappear"
有沒有配置該顯示其他郵件的方式? (i18n用) 非常感謝!
Manuel
模態窗口如果您關閉使用檢票ModalWindows當窗口,你得到這個消息:改變unloadConfirmation消息中的Apache Wicket的
"Reloading this page will cause modal window to disappear"
有沒有配置該顯示其他郵件的方式? (i18n用) 非常感謝!
Manuel
您可以通過將Javascript變量Wicket.Window.unloadConfirmation
設置爲false
來關閉模式窗口消息並在window.onbeforeunload
上提供您自己的處理程序。
所以,你必須設置下面的JavaScript在您的網頁:
Wicket.Window.unloadConfirmation = false;
window.onbeforeunload=function(){
return I18n("yourI18nKey");
}
這是一個瀏覽器相關的消息,而不是一個檢票信息。
我相信Chrome和IE會顯示你指出的那個。
Firefox 4顯示「此頁面要求您確認您要離開 - 您輸入的數據可能未保存。」
我發現了另一個很常見的方式發展模式的看法時,得到的警告:如果你恰巧得到這個確認框意外,它可能是您的代碼中出現錯誤的指示(日誌中的異常)並修復錯誤也會修復此消息的顯示。
值得注意的是,確認框只是錯誤的指示,而不是錯誤本身的原因。錯誤在別處。
來源:http://ttlnews.blogspot.fi/2010/07/lessons-learned-wicket-spring-hibernate.html