[ 
https://issues.apache.org/jira/browse/WICKET-5071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13599397#comment-13599397
 ] 

Jared Sol commented on WICKET-5071:
-----------------------------------

I changed the code to the following which solves the problem for ie_7 and ie_8. 
This seems pretty hackish to me but it seems to work. Basically I am just 
forcing the ie_8 url to be determined relative to the tab and not the outer 
modal.

if (isCustomComponent() == false)
{
        Page page = createPage();
        if (page == null)
        {
                throw new WicketRuntimeException("Error creating page for modal 
dialog.");
        }
        CharSequence pageUrl, ie8_pageUrl = null;
        RequestCycle requestCycle = RequestCycle.get();

        Url original = requestCycle.getUrlRenderer().getBaseUrl();

        if (page.isPageStateless())
        {
                pageUrl = requestCycle.urlFor(page.getClass(), 
page.getPageParameters());

                // For ie_7 and ie_8 we want to evaluate the url from the tab 
and not the page. So I'm setting the BaseUrl to a new Url to
                // force this to happen and reverting it back after the url has 
been generated for ie_7 and ie_8.
                requestCycle.getUrlRenderer().setBaseUrl(new Url());
                ie8_pageUrl = requestCycle.urlFor(page.getClass(), 
page.getPageParameters());
                requestCycle.getUrlRenderer().setBaseUrl(original);

                appendAssignment(buffer, "settings.ie8_src", ie8_pageUrl);
        }
        else
        {
                IRequestHandler handler = new RenderPageRequestHandler(new 
PageProvider(page));
                pageUrl = requestCycle.urlFor(handler);

                // For ie_7 and ie_8 we want to evaluate the url from the tab 
and not the page. So I'm setting the BaseUrl to a new Url to
                // force this to happen and reverting it back after the url has 
been generated for ie_7 and ie_8.
                requestCycle.getUrlRenderer().setBaseUrl(new Url());
                ie8_pageUrl = 
requestCycle.getUrlRenderer().renderRelativeUrl(requestCycle.mapUrlFor(handler));
                requestCycle.getUrlRenderer().setBaseUrl(original);

                appendAssignment(buffer, "settings.ie8_src", ie8_pageUrl);
        }

        appendAssignment(buffer, "settings.src", pageUrl);
}
                
> 404 Error on Nested ModalWindows in IE7 and IE8
> -----------------------------------------------
>
>                 Key: WICKET-5071
>                 URL: https://issues.apache.org/jira/browse/WICKET-5071
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.5.8, 6.6.0
>         Environment: Internet Explorer 8.0.7601.17514
> Internet Explorer 7.0.5730.13
> Jetty 7 (multiple versions replicate the problem)
> Tomcat 6
>            Reporter: Jered Myers
>         Attachments: NestedModals.zip
>
>
> When opening a ModalWindow inside a ModalWindow, the inner ModalWindow 
> generates a 404 error.  Both windows use a PageCreator for content.
> To replicate, you must use an actual IE 7 or IE 8 browser, as this does not 
> replicate using developer tools and setting the document and brower to IE 7.
> The problem can be seen at 
> http://www.wicket-library.com/wicket-examples/ajax/modal-window.  I will 
> attach a Quickstart as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to