Thanks for the suggestion.
But I wanted it to be transparent for me in this case, so I did not have
to change my Headercontributor...
Problem are that I use markup inheritance and in my basepage I include a
base css.. Writing this it's actually pretty simple to see the solution,
it can just be done by ordinary java, i'll just make a method that
returns the defaultstyle and then I can change the default to what ever
I want.
Hehe, as always why do it in a complicated way when it can be done
simple.. -Wicket is just plain java:)
Srikanth.NT wrote:
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/
--
-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]