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 2008/07/18 06:31:44 UTC

svn commit: r677819 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/ExternalLink.java

Author: ivaynberg
Date: Thu Jul 17 21:31:44 2008
New Revision: 677819

URL: http://svn.apache.org/viewvc?rev=677819&view=rev
Log:
WICKET-1535

Modified:
    wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/ExternalLink.java

Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/ExternalLink.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/ExternalLink.java?rev=677819&r1=677818&r2=677819&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/ExternalLink.java (original)
+++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/ExternalLink.java Thu Jul 17 21:31:44 2008
@@ -161,12 +161,12 @@
 						url = url.substring(1);
 					}
 					url = RequestCycle.get().getRequest().getRelativePathPrefixToContextRoot() +
-							url;
+						url;
 				}
 
 				// if the tag is an anchor proper
 				if (tag.getName().equalsIgnoreCase("a") || tag.getName().equalsIgnoreCase("link") ||
-						tag.getName().equalsIgnoreCase("area"))
+					tag.getName().equalsIgnoreCase("area"))
 				{
 					// generate the href attribute
 					tag.put("href", Strings.replaceAll(url, "&", "&"));
@@ -191,7 +191,7 @@
 					else
 					{
 						// or generate an onclick JS handler directly
-						tag.put("onclick", "window.location.href='" + url + "';");
+						tag.put("onclick", "window.location.href='" + url + "';return false;");
 					}
 				}
 			}
@@ -229,7 +229,7 @@
 		if ((label != null) && (label.getObject() != null))
 		{
 			replaceComponentTagBody(markupStream, openTag,
-					getModelObjectAsString(label.getObject()));
+				getModelObjectAsString(label.getObject()));
 		}
 		else
 		{