• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Incorrect css mime type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Incorrect css mime type
      • From: Shaft <email@hidden>
References: 
 >Incorrect css mime type (From: Shaft <email@hidden>)

  • Prev by Date: Re: You crossed editing context boundaries...
  • Next by Date: Re: You crossed editing context boundaries...
  • Previous by thread: Re: Incorrect css mime type
  • Next by thread: Re: Incorrect css mime type
  • Index(es):
    • Date
    • Thread