You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Roman Uhlig Maxity.de" <ro...@maxity.de> on 2009/06/17 16:34:54 UTC

ResourceReference not locale aware?

I'm trying to load localized versions of an image with a
ResourceReference. The javadoc says:

"The locale and/or style do not need to be set on a resource reference
because those values will automatically be determined based on the
context in which the resource is being used."

Actually, it does not. No matter what locale is set in the session,
ResourceReference is returning the same base version of the image when
used like that:

new Image("image", new ResourceReference(this.getClass(),
"res/imagepack1/localized_testimage.gif"));

res/imagepack1 contains the localized images as well, e.g.
localized_testimage_de.gif.

I'm using 1.4-rc4 right now. Am I doing something wrong or does it just
not work? 

Thanks for any hints on that,
Roman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: ResourceReference not locale aware?

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Possible, but hard to believe that no one else has reported.  Could
you create a quickstart and attach it to a JIRA issue, then post the
issue number back to this thread so that we can look into it?

Thanks!

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Jun 17, 2009 at 9:34 AM, Roman Uhlig
Maxity.de<ro...@maxity.de> wrote:
>
> I'm trying to load localized versions of an image with a
> ResourceReference. The javadoc says:
>
> "The locale and/or style do not need to be set on a resource reference
> because those values will automatically be determined based on the
> context in which the resource is being used."
>
> Actually, it does not. No matter what locale is set in the session,
> ResourceReference is returning the same base version of the image when
> used like that:
>
> new Image("image", new ResourceReference(this.getClass(),
> "res/imagepack1/localized_testimage.gif"));
>
> res/imagepack1 contains the localized images as well, e.g.
> localized_testimage_de.gif.
>
> I'm using 1.4-rc4 right now. Am I doing something wrong or does it just
> not work?
>
> Thanks for any hints on that,
> Roman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org