wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asfernandes <adrian...@gmail.com>
Subject Re: Mounting URLs with locale prefix
Date Tue, 28 Aug 2012 12:10:30 GMT

Martin Grigorov-4 wrote
> The segment with the locale should be removed by the IRequestMapper as
> LocaleFirstMapper does.

But on UrlRenderer#renderContextRelativeUrl, getBaseUrl() shows pt-br/home
when I'm accessing http://localhost:8990/Site/pt-br/home

This caused my tags to be rewritten from:
	<link rel="stylesheet" type="text/css" href="styles/cssreset-min.css" />
	<link rel="stylesheet" type="text/css" href="../styles/cssreset-min.css" />

The first is the one I want, since the resources is also mounted with
LocaleFirstMapper, and I want it there.

So maybe some setBaseUrl call is missing, to adjust the URL on the

Martin Grigorov-4 wrote
> But in your case you have the locale hardcoded in the .css file, or at
> least this is what I understood, and Wicket should not remove anything
> that is not added by it.

It's not hardcoded. It's relative and I want Wicket to preserve the locale
on the URL, but it's stripping it.

My resources are not localized, but looks better for me to mount them under
the locale prefix, since Wicket could not rewrite embedded or inline CSS,
and I want to use relative paths there too.

View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mounting-URLs-with-locale-prefix-tp4651528p4651562.html
Sent from the Users forum mailing list archive at Nabble.com.

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

View raw message