That does look like a lot of code to cut. I don't know who wrote the actual stuff, but I'm sure we should be able to simplify this.
Eelco On 10/7/05, Juergen Donnerstag <[EMAIL PROTECTED]> wrote: > 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 > ------------------------------------------------------- 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
