You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2010/08/14 00:39:36 UTC

svn commit: r985390 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java

Author: ivaynberg
Date: Fri Aug 13 22:39:35 2010
New Revision: 985390

URL: http://svn.apache.org/viewvc?rev=985390&view=rev
Log:
DropDownChoice onSelectionChanged with setResponsePage causes weird exceptions
Issue: WICKET-2985

Modified:
    wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java?rev=985390&r1=985389&r2=985390&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java Fri Aug 13 22:39:35 2010
@@ -198,10 +198,12 @@ public class DropDownChoice<T> extends A
 			}
 			else
 			{
+
 				// TODO: following doesn't work with portlets, should be posted to a dynamic hidden
 				// form
 				// with an ActionURL or something
-				tag.put("onchange", "window.location.href='" + url +
+				tag.put("onchange", "window.location.href='" +
+					getRequestCycle().getUrlRenderer().renderUrl(url) +
 					(url.toString().indexOf('?') > -1 ? "&amp;" : "?") + getInputName() +
 					"=' + this.options[this.selectedIndex].value;");
 			}