You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jd...@apache.org on 2007/10/14 10:30:38 UTC
svn commit: r584511 -
/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/resources/PackagedResourceReference.java
Author: jdonnerstag
Date: Sun Oct 14 01:30:38 2007
New Revision: 584511
URL: http://svn.apache.org/viewvc?rev=584511&view=rev
Log:
wicket-1051: StyleSheetReference doesn't take style/locale into account
fixed
Modified:
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/resources/PackagedResourceReference.java
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/resources/PackagedResourceReference.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/resources/PackagedResourceReference.java?rev=584511&r1=584510&r2=584511&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/resources/PackagedResourceReference.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/resources/PackagedResourceReference.java Sun Oct 14 01:30:38 2007
@@ -38,8 +38,7 @@
* @param id
* component id
* @param referer
- * the class that is refering; is used as the relative root for
- * gettting the resource
+ * the class that is refering; is used as the relative root for gettting the resource
* @param file
* relative location of the packaged file
* @param attributeToReplace
@@ -57,11 +56,10 @@
* @param id
* component id
* @param referer
- * the class that is refering; is used as the relative root for
- * gettting the resource
+ * the class that is refering; is used as the relative root for gettting the resource
* @param file
- * model that supplies the relative location of the packaged
- * file. Must return an instance of {@link String}
+ * model that supplies the relative location of the packaged file. Must return an
+ * instance of {@link String}
* @param attributeToReplace
* the attribute to replace of the target tag
*/
@@ -94,12 +92,12 @@
{
throw new IllegalArgumentException("The model must provide a non-null object");
}
- if ( !( o instanceof String) )
+ if (!(o instanceof String))
{
throw new IllegalArgumentException("The model must provide a string");
}
String f = getConverter(String.class).convertToString(o, getLocale());
- ResourceReference ref = new ResourceReference(referer, f);
+ ResourceReference ref = new ResourceReference(referer, f, getLocale(), getStyle());
return urlFor(ref);
}
};
@@ -172,8 +170,7 @@
Object o = resourceReference.getObject();
if (o == null)
{
- throw new IllegalArgumentException(
- "The model must provide a non-null object");
+ throw new IllegalArgumentException("The model must provide a non-null object");
}
if (!(o instanceof ResourceReference))
{