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

Jered Myers commented on WICKET-5071:
-------------------------------------

Below are some of my observations during testing.  I compared my Chrome browser 
which has no problem to the IE 7 and IE 8 browsers with problems.

*modal.js*
When the modal window opens it hits the load function in modal.js.  This 
function redirects to the content page at this line of code:
{code:title=modal.js}
if(Wicket.Browser.isIELessThan9()){
    this.content.contentWindow.location.replace(this.settings.ie8_src);
}else{
    this.content.contentWindow.location.replace(this.settings.src);
} 
{code}
The value that is set in settings.ie8_src and settings.src is the same between 
my Chrome browser and my IE 7 and 8 browsers.  The outer modal is  
"./wicket/bookmarkable/com.qs.NestedModals.OuterModalContent" and the inner 
modal is "./com.qs.NestedModals.InnerModalContent".  Once the request hits the 
Jetty server on Chrome for the inner modal the _serveletPath is 
"/wicket/bookmarkable/com.qs.NestedModals.InnerModalContent" in IE when I see 
the error it is "/com.qs.NestedModals.InnerModalContent"....so 
window.loaction.replace("./com.qs.NestedModals.InnerModalContent") correctly 
changes to "/wicket/bookmarkable/com.qs.NestedModals.InnerModalContent" in 
Chrome, but not in IE.

*ModalWindow.java*
In 
org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow#getWindowOpenJavaScript(),
 there is code to set the "settings.ie8_src" attribute which modal.js uses.  
The page is stateless, so the first path is followed.  Here is that code:
{code:title=ModalWindow#getWindowOpenJavaScript()}
if (page.isPageStateless())
{
    pageUrl = requestCycle.urlFor(page.getClass(), page.getPageParameters());
    appendAssignment(buffer, "settings.ie8_src", pageUrl);
}
else
{
    IRequestHandler handler = new RenderPageRequestHandler(new 
PageProvider(page));

    pageUrl = requestCycle.urlFor(handler);
    String ie8_pageUrl = 
requestCycle.getUrlRenderer().renderRelativeUrl(requestCycle.mapUrlFor(handler));
    appendAssignment(buffer, "settings.ie8_src", ie8_pageUrl);
}

  appendAssignment(buffer, "settings.src", pageUrl);
{code}
I attempted to call setStateLessHint(false) in my content pages to see if the 
different URL in the bottom path would get around the problem, but that didn't 
resolve the problem.  Also, the bottom path had the same value for both pageUrl 
and ie8_pageUrl.

*Other*
The problem, in the end, is that there are no mappers that can find the page.  
As an experiment, I setup the inner content page as a mounted page.  This 
solved my problem in the Quickstart, but didn't fix the problem I have in my 
main application (I was hopping to just mount the few pages I needed to nest as 
a work around).
                
> 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