You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2011/04/12 17:18:39 UTC
svn commit: r1091458 -
/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: mgrigorov
Date: Tue Apr 12 15:18:39 2011
New Revision: 1091458
URL: http://svn.apache.org/viewvc?rev=1091458&view=rev
Log:
WICKET-3606 wicket-ajax.js replaceOuterhtmlIE() fails when the page title has to be updated with Ajax
Add a check whether the element which should be re-rendered is <title> and use "document.title = titleText" instead.
Modified:
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=1091458&r1=1091457&r2=1091458&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original)
+++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Tue Apr 12 15:18:39 2011
@@ -210,7 +210,12 @@ Wicket.replaceOuterHtmlIE = function(ele
Wicket.Log.error("Wicket.replaceOuterHtmlIE: " + e + ": eval -> " + script);
}
return;
- }
+ } else if (element.tagName == "TITLE") {
+ // match the text between the tags
+ var titleText = />(.*?)</.exec(text)[1];
+ document.title = titleText;
+ return;
+ }
var parent = element.parentNode;
var tn = element.tagName;