wicket-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fran├žois-Xavier Lacroix <fxlacr...@gmail.com>
Subject Re: Autolinking resources in 1.4: different path after second request
Date Fri, 02 Oct 2009 13:00:36 GMT
I m not sure this is the best way to add css ressources...
try to use instead
add(CssPackageResource.getHeaderContribution("main.css"));
assuming your css file is in you webapp

On Fri, Oct 2, 2009 at 2:47 PM, Daniel Stoch <daniel.stoch@gmail.com> wrote:

> Hi,
>
> We have the following problem after upgrade to Wicket 1.4:
> Prepare quickstart application and add a one simple css file to HomePage,
> eg.
>
> main.css:
>
> body {
>   background-color: green;
> }
>
> HomePage.html:
> ...
>    <head>
>        <title>Wicket Quickstart Archetype Homepage</title>
>                <wicket:link>
>                        <link href="main.css" rel="stylesheet"
> type="text/css"
> media="screen, projection"/>
>                </wicket:link>
>    </head>
> ...
>
> After the first request to application (eg.
> http://localhost:8080/myproject) a link for main.css is rendered as:
>
> <link href="resources/com.mycompany.HomePage/main.css"
> rel="stylesheet" type="text/css" media="screen, projection"/>
>
> but after the second request (you can simply click "refresh" in a
> browser) this link is always rendered as:
>
> <link href="resources/com.mycompany.HomePage/main_pl.css"
> rel="stylesheet" type="text/css" media="screen, projection"/>
>
> So the locale string (in my browser it is "_pl") is appended to the
> resource path.
> This occurs in Wicket 1.4.1 and 1.4-SNAPSHOT, in Wicket 1.3.6 the path
> always is without locale.
> Is it a valid behavior or is it a bug?
>
> PS. This causes a problems when using wicketstuff-merged-resources,
> when we are mounting css files.
>
> --
> Daniel
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message