Author: knopp
Date: Sun Apr 5 00:08:29 2009
New Revision: 762035
URL: http://svn.apache.org/viewvc?rev=762035&view=rev
Log: (empty)
Modified:
wicket/sandbox/knopp/experimental/wicket-ng/src/main/java/org/apache/wicket/resource/ResourceReferenceRegistry.java
Modified:
wicket/sandbox/knopp/experimental/wicket-ng/src/main/java/org/apache/wicket/resource/ResourceReferenceRegistry.java
URL:
http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket-ng/src/main/java/org/apache/wicket/resource/ResourceReferenceRegistry.java?rev=762035&r1=762034&r2=762035&view=diff
==============================================================================
---
wicket/sandbox/knopp/experimental/wicket-ng/src/main/java/org/apache/wicket/resource/ResourceReferenceRegistry.java
(original)
+++
wicket/sandbox/knopp/experimental/wicket-ng/src/main/java/org/apache/wicket/resource/ResourceReferenceRegistry.java
Sun Apr 5 00:08:29 2009
@@ -103,6 +103,30 @@
map.remove(key);
}
+ protected ResourceReference getResourceReference(Class<?> scope, String
name, Locale locale,
+ String style, boolean strict, boolean createIfNotFound)
+ {
+ Key key = new Key(scope.getName(), name, locale, style);
+ ResourceReference res = map.get(key);
+ if (strict || res != null)
+ {
+ return res;
+ }
+ else
+ {
+ res = getResourceReference(scope, name, locale,
null, true);
+ if (res == null)
+ {
+ res = getResourceReference(scope, name,
null, null, true);
+ }
+ if (res == null && createIfNotFound)
+ {
+ res =
createDefaultResourceReference(scope, name, locale, style);
+ }
+ return res;
+ }
+ }
+
/**
* Looks up resource reference with specified attributes. If the
reference is not found and
* <code>strict</code> is set to <code>false</code>, result of
@@ -126,25 +150,7 @@
public ResourceReference getResourceReference(Class<?> scope, String
name, Locale locale,
String style, boolean strict)
{
- Key key = new Key(scope.getName(), name, locale, style);
- ResourceReference res = map.get(key);
- if (strict || res != null)
- {
- return res;
- }
- else
- {
- res = getResourceReference(scope, name, locale, null,
true);
- if (res == null)
- {
- res = getResourceReference(scope, name, null,
null, true);
- }
- if (res == null)
- {
- res = createDefaultResourceReference(scope,
name, locale, style);
- }
- return res;
- }
+ return getResourceReference(scope, name, locale, style, strict,
true);
}
protected ResourceReference createDefaultResourceReference(Class<?>
scope, String name,