You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jr...@apache.org on 2010/08/28 04:09:00 UTC
svn commit: r990314 -
/wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
Author: jrthomerson
Date: Sat Aug 28 02:09:00 2010
New Revision: 990314
URL: http://svn.apache.org/viewvc?rev=990314&view=rev
Log:
fix WICKET-3019 in trunk
Peter Ertl supplied this patch.
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java?rev=990314&r1=990313&r2=990314&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java Sat Aug 28 02:09:00 2010
@@ -3583,9 +3583,11 @@ public abstract class Component
{
if (!tag.getName().equalsIgnoreCase(name))
{
- findMarkupStream().throwMarkupException(
- "Component " + getId() + " must be applied to a tag of type '" + name + "', not " +
- tag.toUserDebugString());
+ String msg = String.format("Component [%s] (path = [%s]) must be " +
+ "applied to a tag of type [%s], not: %s",
+ getId(), getPath(), name, tag.toUserDebugString());
+
+ findMarkupStream().throwMarkupException(msg);
}
}
@@ -3609,9 +3611,11 @@ public abstract class Component
final String tagAttributeValue = tag.getAttributes().getString(key);
if (tagAttributeValue == null || !value.equalsIgnoreCase(tagAttributeValue))
{
- findMarkupStream().throwMarkupException(
- "Component " + getId() + " must be applied to a tag with '" + key +
- "' attribute matching '" + value + "', not '" + tagAttributeValue + "'");
+ String msg = String.format("Component [%s] (path = [%s]) must be applied to a tag " +
+ "with [%s] attribute matching [%s], not [%s]",
+ getId(), getPath(), key, value, tagAttributeValue);
+
+ findMarkupStream().throwMarkupException(msg);
}
}
}