You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by at...@apache.org on 2007/09/12 15:16:01 UTC

svn commit: r574940 - /wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js

Author: ate
Date: Wed Sep 12 06:16:00 2007
New Revision: 574940

URL: http://svn.apache.org/viewvc?rev=574940&view=rev
Log:
ICKET-924: New Wicket Portlet support: Support non-relative urls in Ajax.Request redirect callback handling
See: https://issues.apache.org/jira/browse/WICKET-650 and https://issues.apache.org/jira/browse/WICKET-924
- fixed buggy/invalid implementation (Javascript API != Java API hehe)

Modified:
    wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js

Modified: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=574940&r1=574939&r2=574940&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Wed Sep 12 06:16:00 2007
@@ -774,8 +774,8 @@
 					t.onreadystatechange = Wicket.emptyFunction;
 					
                     // support/check for non-relative redirectUrl like as provided and needed in a portlet context
-					if (redirectUrl.startsWith("/")||redirectUrl.startsWith("http://")||redirectUrl.startsWith("https://")) {
-					    window.location = calculatedRedirect;
+					if (redirectUrl.charAt(0)==('/')||redirectUrl.match("^http://")=="http://"||redirectUrl.match("^https://")=="https://") {
+					    window.location = redirectUrl;
 					}
 					else {
 					    var urlDepth = 0;