Author: pete
Date: Fri Sep 17 07:53:29 2010
New Revision: 998013
URL: http://svn.apache.org/viewvc?rev=998013&view=rev
Log:
WICKET-3048: added missing javascript part
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=998013&r1=998012&r2=998013&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
(original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Fri
Sep 17 07:53:29 2010
@@ -1274,8 +1274,10 @@ Wicket.Ajax.Call.prototype = {
this.processEvaluation(steps, node);
} else if (node.tagName == "header-contribution") {
this.processHeaderContribution(steps, node);
+ } else if (node.tagName == "redirect") {
+ this.processRedirect(steps, node);
}
-
+
}
if (stepIndexOfLastReplacedComponent != -1) {
this.processFocusedComponentReplaceCheck(steps,
stepIndexOfLastReplacedComponent);
@@ -1399,6 +1401,13 @@ Wicket.Ajax.Call.prototype = {
c.processContribution(steps, node);
},
+ // Adds a closure that processes a redirect
+ processRedirect: function(steps, node) {
+ var text = node.firstChild.nodeValue;
+ Wicket.Log.info("Redirecting to: "+text);
+ window.location=text;
+ },
+
// mark the focused component so that we know if it has been replaced
by response
processFocusedComponentMark: function(steps) {
steps.push(function(notify) {