Re: ModalWindow does not close cleanly
I noticed also that if I add a dummy window closed call back to my page: 1) In the modal window, calling window.close() sets the "shown" flag to false 2) My dummy callback causes ModalWindow.WindowClosedBehavior to respond. The current value of this shown flag is still true! Then the behavior sets it to false again. I believed that calling "window.close()" from inside a window that uses page does not close the window cleanly. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow does not close cleanly
On 01/03/2012 12:30 AM, Nelson Segura wrote: The "shown" flag is set up to false by window.close(), but it stays as true in the context of the parent page. This prevents the page from being opened a second time. Maybe something similar to how you cannot pass pages directly to a modal, but instead should pass a page reference. I agree with you. Your problem seems very similar to the one of passing page to modal. I think this issue has to do with page serialization: when we try to open modal window a second time, Wicket uses the "old" versions of both main page and modal window where "shown" flag is true. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow does not close cleanly
:) A patch will be nice, but ... I think this has to do with my modal window using page instead of panel. Could it be? The window clears up the "shown" flag correctly if I press in the "x" for the modal window, because the CloseButtonBehavior gets called, but then the Ajax Target being used is in the context of the parent page. The "x" icon sits outside the window. My close/cancel button is calling window.close() directly, but that is being executed inside the context of the modal page. The "shown" flag is set up to false by window.close(), but it stays as true in the context of the parent page. This prevents the page from being opened a second time. Maybe something similar to how you cannot pass pages directly to a modal, but instead should pass a page reference. If I provide a dummy WindowClosedCallback, then the flag gets clear in the context of the parent page. I don't know if what I am saying is clear or correct, but I don't exactly know where to start to fix this :( -nelson - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow does not close cleanly
a patch is welcome :) -igor On Mon, Jan 2, 2012 at 10:24 AM, Nelson Segura wrote: > Any hope this can be fixed for 1.5.4? I will hate having to change all > our modals to have a dummy call back to get it to work :( > -Nelson > > On Wed, Dec 21, 2011 at 2:59 PM, Nelson Segura wrote: >> I have created a ticket, and attached a quick start to it >> >> https://issues.apache.org/jira/browse/WICKET-4311 >> >> Notice that if you uncomment the dummy callback code, you will be able >> to reopen the modal. > > - > 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
Re: ModalWindow does not close cleanly
Any hope this can be fixed for 1.5.4? I will hate having to change all our modals to have a dummy call back to get it to work :( -Nelson On Wed, Dec 21, 2011 at 2:59 PM, Nelson Segura wrote: > I have created a ticket, and attached a quick start to it > > https://issues.apache.org/jira/browse/WICKET-4311 > > Notice that if you uncomment the dummy callback code, you will be able > to reopen the modal. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow does not close cleanly
I have created a ticket, and attached a quick start to it https://issues.apache.org/jira/browse/WICKET-4311 Notice that if you uncomment the dummy callback code, you will be able to reopen the modal. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow does not close cleanly
i took the window closed callback out of the ModalWindowPage in wicket-examples and was able to close and reopen the modal...please create a quickstart and attach it to a jira issue. -igor On Mon, Dec 19, 2011 at 12:39 PM, Nelson Segura wrote: > Sorry, I meant respond() ... > > > On Mon, Dec 19, 2011 at 11:46 AM, Igor Vaynberg > wrote: >> WindowClosedBehavior does not have render()...? >> >> -igor >> >> On Mon, Dec 19, 2011 at 11:40 AM, Nelson Segura wrote: >>> I found that if you have a modal window, and then you close it, it is >>> not possible to reopen it anymore unless you have set a >>> WindowClosedCallback. This is because WindowClosedBehavior.render() >>> does not get called. >>> >>> - >>> 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 >> > > - > 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
Re: ModalWindow does not close cleanly
Sorry, I meant respond() ... On Mon, Dec 19, 2011 at 11:46 AM, Igor Vaynberg wrote: > WindowClosedBehavior does not have render()...? > > -igor > > On Mon, Dec 19, 2011 at 11:40 AM, Nelson Segura wrote: >> I found that if you have a modal window, and then you close it, it is >> not possible to reopen it anymore unless you have set a >> WindowClosedCallback. This is because WindowClosedBehavior.render() >> does not get called. >> >> - >> 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 > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow does not close cleanly
WindowClosedBehavior does not have render()...? -igor On Mon, Dec 19, 2011 at 11:40 AM, Nelson Segura wrote: > I found that if you have a modal window, and then you close it, it is > not possible to reopen it anymore unless you have set a > WindowClosedCallback. This is because WindowClosedBehavior.render() > does not get called. > > - > 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
ModalWindow does not close cleanly
I found that if you have a modal window, and then you close it, it is not possible to reopen it anymore unless you have set a WindowClosedCallback. This is because WindowClosedBehavior.render() does not get called. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org