Re: close a ModalWindow when session expired
no i think the server is always called: add(new CloseButtonBehavior()); add(new WindowClosedBehavior()); one of those behaviors are called. when you press the button. Else the server will not be cleaned up. And the page that has the modal window still thinks it is visible On Mon, Dec 14, 2009 at 16:01, Bernard Lupin beal6...@yahoo.fr wrote: Thank you Johan, you're right... except that there is always a cross in the upper right corner of the modal window, that allows to close the modal window without sending any ajax request to the server. So I just would like to have a close button that do the same as the cross image, but I'm not able to find which javascript code is executed on this cross image. Regards Bernard Johan Compagner wrote: it could be that if you do that then in normal use the serverside doesnt know that the modal window isnt shown anymore. So i guess you should also try to let the server know. On Fri, Dec 4, 2009 at 10:16, Bernard Lupin wrote: Hi again, After a lot of various tries, I finally found a solution that seems to work. On my ModalWindow close button, I don't need javacode anymore, I just have this small javascript command in the markup file: onclick=window.parent.Wicket.Window.close(); Do you think that it's a good way to solve my problem ? Regards, Bernard Bernard Lupin wrote: Hi, On my ModalWindow's close button, I only want to ... close the modal window. It seems that myWindow.close(target) calls some Ajax request, which is failing when session is expired. But if I click on the cross button in the upper right of the modal window, everything works well : the modal window is closed and the original window becomes active again. I searched in source page and in wicket source code, but can't find what code is behind this cross button. Could you tell me which javascript code I could invoke on my close button, to close the window without ajax request ? Thanks a lot Bernard -- View this message in context: http://old.nabble.com/close-a-ModalWindow-when-session-expired-tp26622679p26779142.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
Re: close a ModalWindow when session expired
Thank you Johan, you're right... except that there is always a cross in the upper right corner of the modal window, that allows to close the modal window without sending any ajax request to the server. So I just would like to have a close button that do the same as the cross image, but I'm not able to find which javascript code is executed on this cross image. Regards Bernard Johan Compagner wrote: it could be that if you do that then in normal use the serverside doesnt know that the modal window isnt shown anymore. So i guess you should also try to let the server know. On Fri, Dec 4, 2009 at 10:16, Bernard Lupin wrote: Hi again, After a lot of various tries, I finally found a solution that seems to work. On my ModalWindow close button, I don't need javacode anymore, I just have this small javascript command in the markup file: onclick=window.parent.Wicket.Window.close(); Do you think that it's a good way to solve my problem ? Regards, Bernard Bernard Lupin wrote: Hi, On my ModalWindow's close button, I only want to ... close the modal window. It seems that myWindow.close(target) calls some Ajax request, which is failing when session is expired. But if I click on the cross button in the upper right of the modal window, everything works well : the modal window is closed and the original window becomes active again. I searched in source page and in wicket source code, but can't find what code is behind this cross button. Could you tell me which javascript code I could invoke on my close button, to close the window without ajax request ? Thanks a lot Bernard -- View this message in context: http://old.nabble.com/close-a-ModalWindow-when-session-expired-tp26622679p26779142.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
Re: close a ModalWindow when session expired
Hi again, After a lot of various tries, I finally found a solution that seems to work. On my ModalWindow close button, I don't need javacode anymore, I just have this small javascript command in the markup file: onclick=window.parent.Wicket.Window.close(); Do you think that it's a good way to solve my problem ? Regards, Bernard Bernard Lupin wrote: Hi, On my ModalWindow's close button, I only want to ... close the modal window. It seems that myWindow.close(target) calls some Ajax request, which is failing when session is expired. But if I click on the cross button in the upper right of the modal window, everything works well : the modal window is closed and the original window becomes active again. I searched in source page and in wicket source code, but can't find what code is behind this cross button. Could you tell me which javascript code I could invoke on my close button, to close the window without ajax request ? Thanks a lot Bernard - 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://old.nabble.com/close-a-ModalWindow-when-session-expired-tp26622679p26635817.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
Re: close a ModalWindow when session expired
it could be that if you do that then in normal use the serverside doesnt know that the modal window isnt shown anymore. So i guess you should also try to let the server know. On Fri, Dec 4, 2009 at 10:16, Bernard Lupin beal6...@yahoo.fr wrote: Hi again, After a lot of various tries, I finally found a solution that seems to work. On my ModalWindow close button, I don't need javacode anymore, I just have this small javascript command in the markup file: onclick=window.parent.Wicket.Window.close(); Do you think that it's a good way to solve my problem ? Regards, Bernard Bernard Lupin wrote: Hi, On my ModalWindow's close button, I only want to ... close the modal window. It seems that myWindow.close(target) calls some Ajax request, which is failing when session is expired. But if I click on the cross button in the upper right of the modal window, everything works well : the modal window is closed and the original window becomes active again. I searched in source page and in wicket source code, but can't find what code is behind this cross button. Could you tell me which javascript code I could invoke on my close button, to close the window without ajax request ? Thanks a lot Bernard - 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://old.nabble.com/close-a-ModalWindow-when-session-expired-tp26622679p26635817.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
close a ModalWindow when session expired
Hi, On my ModalWindow's close button, I only want to ... close the modal window. It seems that myWindow.close(target) calls some Ajax request, which is failing when session is expired. But if I click on the cross button in the upper right of the modal window, everything works well : the modal window is closed and the original window becomes active again. I searched in source page and in wicket source code, but can't find what code is behind this cross button. Could you tell me which javascript code I could invoke on my close button, to close the window without ajax request ? Thanks a lot Bernard - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org