Re: ModalWindow does not close cleanly

2012-01-02 Thread Nelson Segura
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 nsegu...@gmail.com 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

2012-01-02 Thread Igor Vaynberg
a patch is welcome :)

-igor

On Mon, Jan 2, 2012 at 10:24 AM, Nelson Segura nsegu...@gmail.com 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 nsegu...@gmail.com 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

2012-01-02 Thread Nelson Segura
:) 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

2012-01-02 Thread Andrea Del Bene

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

2012-01-02 Thread Nelson Segura
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

2011-12-21 Thread Nelson Segura
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



ModalWindow does not close cleanly

2011-12-19 Thread Nelson Segura
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



Re: ModalWindow does not close cleanly

2011-12-19 Thread Igor Vaynberg
WindowClosedBehavior does not have render()...?

-igor

On Mon, Dec 19, 2011 at 11:40 AM, Nelson Segura nsegu...@gmail.com 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



Re: ModalWindow does not close cleanly

2011-12-19 Thread Nelson Segura
Sorry, I meant respond() ...


On Mon, Dec 19, 2011 at 11:46 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 WindowClosedBehavior does not have render()...?

 -igor

 On Mon, Dec 19, 2011 at 11:40 AM, Nelson Segura nsegu...@gmail.com 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

2011-12-19 Thread Igor Vaynberg
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 nsegu...@gmail.com wrote:
 Sorry, I meant respond() ...


 On Mon, Dec 19, 2011 at 11:46 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 WindowClosedBehavior does not have render()...?

 -igor

 On Mon, Dec 19, 2011 at 11:40 AM, Nelson Segura nsegu...@gmail.com 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