Re: Incorrect css mime type
Re: Incorrect css mime type
- Subject: Re: Incorrect css mime type
- From: Andrew Lindesay <email@hidden>
- Date: Wed, 15 Oct 2008 12:54:18 +1300
Hello;
<link rel="stylesheet" href="./MyApp.woa/Contents/WebServerResources/
stylesheets/style.css" />
Create a method on your component like this;
public String getStyleUrl()
{
WOResourceManager rm = WOApplication.application().resourceManager();
return
rm.urlForResourceNamed("style.css",null,null,context().request());
}
Then on your component template;
<webobject name="StyleGenericElement"/>
In the bindings;
StyleGenericElement : WOGenericElement {
elementName = "link";
rel = "stylesheet";
href = styleUrl;
}
cheers.
___
Andrew Lindesay
www.lindesay.co.nz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden