You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Mike Mander <wi...@gmx.de> on 2011/01/25 09:02:08 UTC

Why is my css variant not used in markup?

Hi all,

i try to load a variant of my main css file (wicket 1.4.15).

The file is located in a webapp-subfolder (src/main/webapp/_css).
So i set the style of session to "branda".  In the page i load the css 
like this
<code>
add(CSSPackageResource.getHeaderContribution("/_css/main.css", "screen"));
</code>

I expected to get css-file "/_css/main_brenda.css" but it's /_css/main.css.
The session style attribute is really "branda". I've checked that already.

Can i do something else to get that working?

Thanks
Mike

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


Re: Why is my css variant not used in markup?

Posted by Mike Mander <wi...@gmx.de>.
With
<code>
add(CSSPackageResource.getHeaderContribution(new 
ResourceReference("_css/cust.css"), "screen"));
</code>

i get
<code>
resources/org.apache.wicket.Application/_css/cust.css
</code>

But this file is not existing and layout is demaged :-(.

Thanks
Mike

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


Re: Why is my css variant not used in markup?

Posted by Jeremy Thomerson <je...@wickettraining.com>.
On Tue, Jan 25, 2011 at 2:02 AM, Mike Mander <wi...@gmx.de> wrote:

> Hi all,
>
> i try to load a variant of my main css file (wicket 1.4.15).
>
> The file is located in a webapp-subfolder (src/main/webapp/_css).
> So i set the style of session to "branda".  In the page i load the css like
> this
> <code>
> add(CSSPackageResource.getHeaderContribution("/_css/main.css", "screen"));
> </code>
>
> I expected to get css-file "/_css/main_brenda.css" but it's /_css/main.css.
> The session style attribute is really "branda". I've checked that already.
>
> Can i do something else to get that working?
>
> Thanks
> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
I don't have my IDE open in front of me, but have you tried using a resource
reference rather than a static URL to your resource?

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

Re: Why is my css variant not used in markup?

Posted by Martin Grigorov <mg...@apache.org>.
On Tue, Jan 25, 2011 at 11:18 AM, Mike Mander <wi...@gmx.de> wrote:

> Thanks Martin.
>
> That would explain, why it's not working. So i will do it manually.
> What do you thing - is it making sense to open an RFE?
>
> Please do. With quickstart application.
With patch is even better.

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

Re: Why is my css variant not used in markup?

Posted by Mike Mander <wi...@gmx.de>.
Thanks Martin.

That would explain, why it's not working. So i will do it manually.
What do you thing - is it making sense to open an RFE?

Mike

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


Re: Why is my css variant not used in markup?

Posted by Martin Grigorov <mg...@apache.org>.
I am not sure this is supported.
Only "component" resources are checked for locale/style/variation.

See ContextImage, ContextPathGenerator and ContextRelativeResource classes
and try to make it working but after brief look I think it wont work.

On Tue, Jan 25, 2011 at 10:52 AM, Mike Mander <wi...@gmx.de> wrote:

> Hi Mathias,
>
> it would be great if it would be that easy. But it isn't. It was my fault.
> The spelling i've already checked (before complaining here :-)
>
> I really look for branda (Take brenda as alias :-). And it isn't working
> :-(
>
> Thanks anyway
>
> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Why is my css variant not used in markup?

Posted by Mike Mander <wi...@gmx.de>.
Hi Mathias,

it would be great if it would be that easy. But it isn't. It was my fault.
The spelling i've already checked (before complaining here :-)

I really look for branda (Take brenda as alias :-). And it isn't working :-(

Thanks anyway
Mike

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


Re: Why is my css variant not used in markup?

Posted by Matthias Gasser <ma...@gmail.com>.
Hello,

First you talk of branda, then brenda. Maybe a shot in the dark, but recheck your spelling and watch out for case sensitivity.

Brgds,
Matthias

--
iPhone Mail


On 25.01.2011, at 09:02, Mike Mander <wi...@gmx.de> wrote:

> Hi all,
> 
> i try to load a variant of my main css file (wicket 1.4.15).
> 
> The file is located in a webapp-subfolder (src/main/webapp/_css).
> So i set the style of session to "branda".  In the page i load the css like this
> <code>
> add(CSSPackageResource.getHeaderContribution("/_css/main.css", "screen"));
> </code>
> 
> I expected to get css-file "/_css/main_brenda.css" but it's /_css/main.css.
> The session style attribute is really "branda". I've checked that already.
> 
> Can i do something else to get that working?
> 
> Thanks
> Mike
> 
> ---------------------------------------------------------------------
> 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