packageresource is for reading files out of java packages. sounds like
your css files are in your webapp. see how ContextImage works, you
might have to write something similar to pull css files out of the
context.

-igor

On Tue, Nov 16, 2010 at 7:35 AM, Benjamin Lorenz
<[email protected]> wrote:
> Hello,
>
> I need to dynamically include different style sheet files for different 
> browser types.
>
> Trying to go with
>
>    add(CSSPackageResource.getHeaderContribution("css/common.css"));
>
> from by BasePage.java, which is the base class all my pages inherit from 
> (net.myself.myproject.BasePage.java)
>
> For some reason, the generated code is
>
> <link rel="stylesheet" type="text/css" href="../css/common.css" />
>
> I cannot get rid of this (wrong!) "../" in the path. The layout in myapp.war 
> is a very basic one:
>
>
> /WEB-INF
> /images
> /css
>
> I am calling my wicket application like this:
>
> http://www.server.com/myapp
>
> So, I can, by hand, reach my css by
>
> http://www.server.com/myapp/css/common.css
>
> But exactly this last path is impossible to create with wicket. I am 
> wondering what is wrong with above code...
>
> Thanks so much for your help!
>
> Benjamin
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to