|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.extensions.util.resource.TextTemplateSharedResourceFactory
A resource (reference) factory that takes a TextTemplate and generates shared resources for various interpolations of that template.
A scope for adding shared resources allows you to limit the namespace impact of the shared resources created. If you omit the scope, the application-wide scope Application.class will be used by default.
You may use resources created by this factory directly by calling resourceReference(Map) to get a resource reference to the given shared resource interpolation represented by the variables in the map. Or, for convenience, you can use TextTemplateLink to link to resources created by this factory.
In many cases, it will be useful to extend this class and override sharedResourceName(Map) to provide a unique name for resources created by the factory using map values. If you don't provide an override, every value in the map will be used to produce the unique name, which may create either longer names or more unique shared resources than you really wanted.
| Constructor Summary | |
TextTemplateSharedResourceFactory(TextTemplate template)
Creates shared text template resources. |
|
TextTemplateSharedResourceFactory(TextTemplate template,
java.lang.Class scope)
Creates shared text template resources with the given scope. |
|
| Method Summary | |
wicket.ResourceReference |
resourceReference(java.util.Map variables)
|
protected java.lang.String |
sharedResourceName(java.util.Map variables)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextTemplateSharedResourceFactory(TextTemplate template)
template - The template to interpolate into
public TextTemplateSharedResourceFactory(TextTemplate template,
java.lang.Class scope)
template - The template to interpolate intoscope - The scope in shared resources to add resources at| Method Detail |
public wicket.ResourceReference resourceReference(java.util.Map variables)
variables - The variables to interpolate into the template
protected java.lang.String sharedResourceName(java.util.Map variables)
variables - Variables that parameterize the linked-to resource
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||