even better is to add this call to the request that opens the window:

onClick( AjaxRequestTarget target )
{
target.appendJavascript( "Wicket.Window.unloadConfirmation = false;" );
  ...
  modal.show( target);
}

This way the logic is still contained in java and it works for a panel or a page popup.



On Sep 12, 2009, at 2:36 AM, Vladimir K wrote:


Try adding this one to the page markup

                <script language="javascript" type="text/javascript">
                        jQuery(document).ready(function(){
                                if (typeof Wicket != 'undefined' && 
Wicket.Window)
                                        Wicket.Window.unloadConfirmation = 
false;
                        });
                </script>


Matthias Keller wrote:

Hi Peter

You would be right as long as it wasn't for a ModalWindow.
When having an open ModalWindow, wicket seems to register an unload
javascript event which - when trying to navigate away from the page (be it by following a link, closing the window etc), displays a confirmation message which you have to accept. I need to avoid that message, but the only way to do that probably is by closing that window first so that the
javascript event gets unloaded.

Matt

Peter Ertl wrote:


   throw new RestartResponseException(OtherPage.class)

window.close() is not needed!


Am 10.09.2009 um 12:50 schrieb Matthias Keller:

OtherPage.class


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org






--
View this message in context: 
http://www.nabble.com/How-to-redirect-from-a-ModalWindow-tp25381117p25411990.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to