I'm not sure I do it the right way. I'd like to reference a file
(href) which has a name that does not have the locale nor the style,
but during runtime the locale and style should be taken into account.
Provided the code below is right, I have to set the locale and style 3
times. Isn't there a simpler way to do it? Eventually the
reference.getPath will replace the href attribute.

final SharedResources sharedResources = getApplication().getSharedResources();
Resource resource = PackageResource.get(clazz, href, getLocale(), getStyle());
sharedResources.add(clazz, href, getLocale(), getStyle(), resource);

// Create the component implementing the link
resourceReference = new PackageResourceReference(getApplication(), clazz, href);
resourceReference.setLocale(getLocale());
resourceReference.setStyle(getStyle());

Juergen


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to