Have you noticed that if you try to close the example window from OK or
CANCEL button it closes even when used through an iframe?

By using firebug, you can place breakpoints to modal.js and see that this
code is executed when the window is closed from OK button:

org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js

On line 699:
            if (this.isIframe() == true) {
                var current =
this.content.contentWindow.Wicket.Window.current;

On line 715
    close: function(force) {
... etc

But the above code is not executed when the modal window is closed from the
X button on upper right corner of the window.

Could it solve the problem if the same close function would be executed from
the X-button too?


On Nov 1, 2007 12:14 PM, Deepak Mahavishnu <[EMAIL PROTECTED]> wrote:

> Hello!
>
> I'm doing some POC testing to find out how a wicket application could be
> used through an IFrame and noticed that closing of a ModalWindow fails.
>
> My setup:
>
> Application A:
> -a dummy html page that has an IFrame
> -the contents of the IFrame is requested from Application B
> <iframe src="http://localhost:8080/mywicketapp/app/"; width="100%"
> height="500"></iframe>
>
> Application B:
> -a Wicket application that uses a ModalWindow
> -deployed to tomcat:  http://localhost:8080/mywicketapp/
>
>
> Problem:
> The ModalWindow is not closed when OK ( or Cancel ) button is clicked when
> Application B is used throug IFrame of Application A.
> OK button performs the actual action (in my case deletes an item from a
> list) but is not closed after the execution of the action.
>
> Closing of the ModalWindow works normally when Application B is not used
> through an IFrame.
>
> Any suggestions how this could be solved?  Or is the usage through an
> IFrame
> a bad idea from start?
>
> Any help is appreciated!
>
> Mahavishnu
>

Reply via email to