[ http://issues.apache.org/jira/browse/WICKET-143?page=all ]
Matej Knopp resolved WICKET-143.
--------------------------------
Fix Version/s: 1.2.4
1.3
2.0
Resolution: Fixed
Also added support for other table elements, opera and inline javascript.
> [PATCH]Re-render a table element via AjaxRequestTarget under IE does not works
> ------------------------------------------------------------------------------
>
> Key: WICKET-143
> URL: http://issues.apache.org/jira/browse/WICKET-143
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Environment: Internet Explorer and AjaxRequestTarget - Wicket1.X and
> trunk
> Reporter: vincent Demay
> Assigned To: Matej Knopp
> Fix For: 1.2.4, 1.3, 2.0
>
> Attachments: patch.txt
>
>
> I write something like that :
> <table>
> <tr wicket:id="toBerefreshed">[...]</tr>
> </table>
> toBeRefreshed is re-render via a AjaxRequestTarget with addComponant.
> The issues is : Javascript to replace tr node under IE use outerHTML but
> outerHTML is readOnly on table element. So replacement failed and an error
> such as "unknow error" is thrown.
> The attaching patch works around this f..ing IE bug using DOM to replace
> table elements :
> Index: /home/doume/dev/wicket/trunk/[WICKET
> TRUNCK]wicket/src/main/java/wicket/ajax/wicket-ajax.js
> ===================================================================
> --- /home/doume/dev/wicket/trunk/[WICKET
> TRUNCK]wicket/src/main/java/wicket/ajax/wicket-ajax.js (revision 479541)
> +++ /home/doume/dev/wicket/trunk/[WICKET
> TRUNCK]wicket/src/main/java/wicket/ajax/wicket-ajax.js (working copy)
> @@ -173,7 +173,18 @@
> break;
> }
> }
> - element.outerHTML=text;
> + try {
> + element.outerHTML=text;
> + } catch (e) {
> + var tn = element.tagName;
> + if(tn=='TBODY' || tn=='TR' || tn=='TD')
> + {
> + var tempDiv = document.createElement("div");
> + tempDiv.innerHTML = '<table id="tempTable"
> style="display: none">' + text + '</table>';
> +
> element.parentNode.replaceChild(tempDiv.getElementsByTagName(tn).item(0),
> element);
> + }
> + else throw e;
> + }
>
> for (var j = i; j < parent.childNodes.length && parent.childNodes[j]
> != next; ++j) {
> Wicket.Head.addJavascripts(parent.childNodes[j]);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira