You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Matej Knopp (JIRA)" <ji...@apache.org> on 2009/02/02 00:16:00 UTC
[jira] Commented: (WICKET-1967) ModalWindow doesn't work in
Internet Explorer 6 and Internet Explorer 7
[ https://issues.apache.org/jira/browse/WICKET-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669477#action_12669477 ]
Matej Knopp commented on WICKET-1967:
-------------------------------------
I don't see anything wrong with the code. What is in your base page?
> ModalWindow doesn't work in Internet Explorer 6 and Internet Explorer 7
> -----------------------------------------------------------------------
>
> Key: WICKET-1967
> URL: https://issues.apache.org/jira/browse/WICKET-1967
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.5
> Environment: Internet Explorer 6 and Internet Explorer 7
> Reporter: Lars Sonchocky-Helldorf
> Assignee: Matej Knopp
> Priority: Critical
> Attachments: WICKET-1967 Ajax Debug Window Output not working version 1.3.5.txt, WICKET-1967 Ajax Debug Window Output working version.txt
>
>
> While the ModalWindow Example of http://www.wicket-library.com/wicket-examples/ajax/modal-window.0 works for me in Internet Explorer 6 and Internet Explorer 7 I can't get the following code to work in IE locally:
> {code:title=HomePage.java}
> public class HomePage extends BaseLayoutPage {
> private static final long serialVersionUID = 1L;
> public HomePage() {
> /*
> * modal window test
> */
> final ModalWindow modalWindow;
> modalWindow = new ModalWindow("modalWindow");
> add(modalWindow);
> modalWindow.setPageMapName("modal-1");
> modalWindow.setCookieName("modal-1");
> modalWindow.setPageCreator(new ModalWindow.PageCreator() {
> public Page createPage() {
> return new ExampleModalContentPage(modalWindow);
> // return PageUtils.newModalSubFormPage(ExampleModalSubFormPage.class, exampleModel, DienstleistungenDetailPage.this, modal1);
> }
> });
> modalWindow.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
> public void onClose(AjaxRequestTarget target) {
> // target.addComponent(result);
> }
> });
> modalWindow.setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
> public boolean onCloseButtonClicked(AjaxRequestTarget target) {
> return true;
> }
> });
> add(new AjaxLink("showModalWindow") {
> @Override
> public void onClick(AjaxRequestTarget target) {
> modalWindow.show(target);
> }
> });
> }
> }
> {code}
> {code:title=HomePage.html}
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
> <html xmlns:wicket="http://wicket.apache.org">
> <head><title>Adminclient</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head>
> <body>
> <wicket:extend>
>
> <div wicket:id="modalWindow"></div>
> <a wicket:id="showModalWindow">Show modal dialog with a page</a>
>
> </wicket:extend>
> </body>
> </html>
> {code}
> {code:title=ExampleModalContentPage.java}
> //$URL: $
> //$Id: $
> package de.synergie.bgb.admin.example;
> import org.apache.wicket.ajax.AjaxRequestTarget;
> import org.apache.wicket.ajax.markup.html.AjaxLink;
> import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
> import org.apache.wicket.markup.html.WebPage;
> /**
> *
> */
> public class ExampleModalContentPage extends WebPage {
> /**
> *
> * @param window
> */
> public ExampleModalContentPage(final ModalWindow window) {
> add(new AjaxLink("closeOK") {
> private static final long serialVersionUID = 1L;
> @Override
> public void onClick(AjaxRequestTarget target) {
> window.close(target);
> }
> });
> add(new AjaxLink("closeCancel") {
> private static final long serialVersionUID = 1L;
> @Override
> public void onClick(AjaxRequestTarget target) {
> window.close(target);
> }
> });
> }
> }
> {code}
> {code:title=ExampleModalContentPage.html}
> <html>
> <head>
> <title>This is modal window</title>
> <style type="text/css">
> body {
> font-family: verdana, sans-serif;
> font-size: 82%;
> background-color: white;
> }
> </style>
> </head>
> <body>
> Modal WINDOW content.
> <p>
> <a wicket:id="closeOK">Close this window with result "OK"</a><br/>
> <a wicket:id="closeCancel">Close this window with result "Cancel"</a><br/>
> </p>
> </body>
> </html>
> {code}
> All I get in IE inside Ajax-Debug is:
> {code}
> INFO: focus set on wicketDebugLink
> INFO: focus removed from wicketDebugLink
> INFO: focus set on showModalWindow8
> INFO: Using ActiveX transport
> INFO:
> INFO: Initiating Ajax GET request on ?wicket:interface=:1:showModalWindow::IBehaviorListener:0:&random=0.5070443492328245
> INFO: Invoking pre-call handler(s)...
> INFO: Received ajax response (1910 characters)
> INFO:
> <?xml version="1.0" encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1" ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script type="text/javascript" src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
> <script type="text/javascript" src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
> <script type="text/javascript" src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
> <script type="text/javascript" id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> wicketAjaxDebugEnable=true;
> /*-->]^]^>*/</script>
> <script type="text/javascript" src="resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.js"></script>
> <link rel="stylesheet" type="text/css" href="resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.css" />
> </head>]]></header-contribution><component id="modalWindow6" ><![CDATA[<div style="display:none" id="modalWindow6">
> <div id="content7">
> </div>
> </div>]]></component><evaluate><![CDATA[var settings = new Object();
> settings.minWidth=200;
> settings.minHeight=200;
> settings.className="w_blue";
> settings.width="600";
> settings.height="400";
> settings.resizable=true;
> settings.src="?wicket:interface=modal-1:1::::";
> settings.iframeName="modal-1";
> settings.cookieId="modal-1";
> settings.mask="semi-transparent";
> settings.onClose = function() { var wcall=wicketAjaxGet('?wicket:interface=:1:modalWindow::IBehaviorListener:1:-1',null,null, function() {return Wicket.$('modalWindow6') != null;}.bind(this)); };
> settings.onCloseButton = function() { var wcall=wicketAjaxGet('?wicket:interface=:1:modalWindow::IBehaviorListener:0:-1',null,null, function() {return Wicket.$('modalWindow6') != null;}.bind(this));return !wcall;};
> Wicket.Window.create(settings).show();
> ]]></evaluate></ajax-response>
> INFO: Response parsed. Now invoking steps...
> ERROR: Exception evaluating javascript: [object Error]
> INFO: Response processed successfully.
> INFO: Invoking post-call handler(s)...
> INFO: Calling focus on showModalWindow8
> INFO: focus removed from showModalWindow8
> INFO: focus set on showModalWindow8
> INFO: focus removed from showModalWindow8
> INFO: focus set on showModalWindow8
> INFO: focus removed from showModalWindow8
> INFO: focus set on showModalWindow8
> INFO: focus removed from showModalWindow8
> {code}
> please note the *ERROR: Exception evaluating javascript: [object Error]*
> while the working example at www.wicket-library.com gives me:
> {code}
> INFO: focus set on wicketDebugLink
> INFO: focus removed from wicketDebugLink
> INFO: focus set on id3
> INFO: Using ActiveX transport
> INFO:
> INFO: Initiating Ajax GET request on ?wicket:interface=:1:showModal1::IBehaviorListener:0:&random=0.8797561115043684
> INFO: Invoking pre-call handler(s)...
> INFO: Received ajax response (2096 characters)
> INFO:
> <?xml version="1.0" encoding="UTF-8"?><ajax-response><evaluate><![CDATA[clientTimeVariable = new Date().getTime();]]></evaluate><header-contribution encoding="wicket1" ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script type="text/javascript" src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
> <script type="text/javascript" src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
> <script type="text/javascript" src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
> <script type="text/javascript" id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> wicketAjaxDebugEnable=true;
> /*-->]^]^>*/</script>
> <script type="text/javascript" src="resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.js"></script>
> <link rel="stylesheet" type="text/css" href="resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.css" />
> </head>]]></header-contribution><component id="id2" ><![CDATA[<div id="id2" style="display:none">
> <div id="id7">
> </div>
> </div>]]></component><evaluate><![CDATA[var settings = new Object();
> settings.minWidth=200;
> settings.minHeight=200;
> settings.className="w_blue";
> settings.width="600";
> settings.height="400";
> settings.resizable=true;
> settings.src="?wicket:interface=modal-1:0::::";
> settings.iframeName="modal-1";
> settings.cookieId="modal-1";
> settings.mask="semi-transparent";
> settings.onClose = function() { var wcall=wicketAjaxGet('?wicket:interface=:1:modal1::IBehaviorListener:1:-1',null,null, function() {return Wicket.$('id2') != null;}.bind(this)); };
> settings.onCloseButton = function() { var wcall=wicketAjaxGet('?wicket:interface=:1:modal1::IBehaviorListener:0:-1',null,null, function() {return Wicket.$('id2') != null;}.bind(this));return !wcall;};
> Wicket.Window.create(settings).show();
> ]]></evaluate><evaluate><![CDATA[window.defaultStatus='Server parsetime: 0.026s, Client parsetime: ' + (new Date().getTime() - clientTimeVariable)/1000 + 's';]]></evaluate></ajax-response>
> INFO: Response parsed. Now invoking steps...
> INFO: Response processed successfully.
> INFO: Invoking post-call handler(s)...
> INFO: focus removed from id3
> INFO: last focus id was not set
> {code}
> I don't know which wicket version www.wicket-library.com is running.
> Both cases (mine and the version of www.wicket-library.com) *do work* in FireFox and Safari
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.