Hi
What we do in our project is to add
public AbstractShopWebPage() {
super();
add(HeaderContributor.forCss(ResourceHelper.getBrandOverrideCss(site.getBrandName())));
}
in the abstract web page. So that it gets attached to all the pages.
And have a static helper method
private static final String CSS_LOCATION = "resources/styles/";
public static ResourceReference getBrandOverrideCss(final String brand)
{
return new
CompressedResourceReference(MagContactWicketApplication.class, CSS_LOCATION
+ "brand.css", null, brand);
}
which loads the brand specific style sheet.
Nino.Martinez wrote:
>
> Hi
>
> Im trying todo some simple variation of my application, by just adding a
> different stylesheet. I thought I wanted to checkout what wicket could
> offer. But I am failing for it to work this is what I am doing:
>
> //setting the style:
> getSession().setStyle("newlook");
>
> I also have this resource added in headercontributor:
>
> public void renderHead(IHeaderResponse response) {
> response.renderCSSReference(new CompressedResourceReference(
> ZeuzPage.class, "default.css"));
> }
>
> now I would expect for wicket to look for a resource called
> default_newlook.css , but it doesnt. Whats wrong?
>
>
>
>
>
>
>
> I've also read this
> http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html
>
> --
> -Wicket for love
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
-----
http://ntsrikanth.blogspot.com/
--
View this message in context:
http://www.nabble.com/session.setStyle-and-resources--tp19667065p19685400.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]