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/01/27 17:10:59 UTC

[jira] Closed: (WICKET-2054) error submmiting a form inside a ModalWindow

     [ https://issues.apache.org/jira/browse/WICKET-2054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matej Knopp closed WICKET-2054.
-------------------------------

    Resolution: Invalid

If you have form in modal window with panel you need to use AjaxButton to submit. Next time please ask such questions on mailing list, this is not what JIRA is for.

> error submmiting a form inside a ModalWindow
> --------------------------------------------
>
>                 Key: WICKET-2054
>                 URL: https://issues.apache.org/jira/browse/WICKET-2054
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.5, 1.4-RC1
>            Reporter: Yosi
>            Assignee: Matej Knopp
>
> * I have a ModalWindow showing a panel.
> * The panel contains a <form>.
> * I can't seem to submit the form inside the ModalWindow.
> * I found the problem in modal.js:
>     Wicket.Window.getMarkup = function() {....} seem to and a <form> tag wrapping the panel.
> * Removing the  <form> tag (see below) seems to fix the problem.
> * Why is this <form> needed anyway??
> My fixed  Wicket.Window.getMarkup:
> -------------------------------------------------------
> Wicket.Window.getMarkup = function(idWindow, idClassElement, idCaption, idContent, idTop, idTopLeft, idTopRight, idLeft, idRight, idBottomLeft, idBottomRight, idBottom, idCaptionText, isFrame) {
> 	var s =
> 			"<div class=\"wicket-modal\" id=\"" + idWindow + "\" style=\"top: 10px; left: 10px; width: 100px;\">" +
> 			"<div id=\"" + idClassElement + "\">" +
> 			"<div class=\"w_top_1\">" +
> 			"<div class=\"w_topLeft\" id=\"" + idTopLeft + "\">" +
> 			"</div>" +
> 			"<div class=\"w_topRight\" id=\"" + idTopRight + "\">" +
> 			"</div>" +
> 			"<div class=\"w_top\" id='" + idTop + "'>" +
> 			"</div>" +
> 			"</div>" +
> 			"<div class=\"w_left\" id='" + idLeft + "'>" +
> 			"<div class=\"w_right_1\">" +
> 			"<div class=\"w_right\" id='" + idRight + "'>" +
> 			"<div class=\"w_content_1\" onmousedown=\"if (Wicket.Browser.isSafari()) { event.ignore = true; }  else { Wicket.stopEvent(event); } \">" +
> 			"<div class=\"w_caption\"  id=\"" + idCaption + "\">" +
> 			"<a class=\"w_close\" href=\"#\"></a>" +
> 			"<span id=\"" + idCaptionText + "\" class=\"w_captionText\"></span>" +
> 			"</div>" +
> 			"<div class=\"w_content_2\">" +
> 			"<div class=\"w_content_3\">" +
> 			"<div class=\"w_content\">";
> 	if (isFrame) {
> 		s +=
> 		"<iframe src='\/\/:' frameborder=\"0\" id='" + idContent + "' allowtransparency=\"false\" style=\"height: 200px\">" +
> 		"</iframe>";
> 	} else {
> 		s +=
> 		"<div class='modal-content' id='" + idContent + "'></div>";
> 	}
> 	s +=
> 	"</div>" +
> 	"</div>" +
> 	"</div>" +
> 	"</div>" +
> 	"</div>" +
> 	"</div>" +
> 	"</div>" +
> 	"<div class=\"w_bottom_1\" id=\"" + idBottom + "\">" +
> 	"<div class=\"w_bottomRight\"  id=\"" + idBottomRight + "\">" +
> 	"</div>" +
> 	"<div class=\"w_bottomLeft\" id=\"" + idBottomLeft + "\">" +
> 	"</div>" +
> 	"<div class=\"w_bottom\" id=\"" + idBottom + "\">" +
> 	"</div>" +
> 	"</div>" +
> 	"</div>" +
> 	"</div>";
> 	return s;
> };

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.