• 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: CSS with WOComponent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CSS with WOComponent


  • Subject: Re: CSS with WOComponent
  • From: Michael DeMan <email@hidden>
  • Date: Sun, 31 Oct 2004 12:27:45 -0800

Out of curiosity,

I've never used WOResourceURL, how does it work with browser caching?

For instance, one nice thing about using a rel="http://www.someserver.com/something.css"; is that the browser loads something.css once and caches it after that, so subsequent pages do need to reload it again.

WO tends to create complex URLs for some items, does the WOResourceURL generate the same URL every time or does it vary per page that it is included in?

- mike


On Oct 31, 2004, at 12:11 PM, Andrew Lindesay wrote:

For the HREF, just use a WOTextField with escapeHTML = "NO" and include
your "href="../Styles.css"

I do this (although it's inside my frameworks now so I don't have to think about it)...


1) add a webserver resource of your CSS file into your app
2) In your "page level component" add the following into the head...

	<LINK type="text/css" rel="<WEBOBJECT NAME=CSSLink></WEBOBJECT>">

3) Now add the following binding...

	CSSLink : WOResourceURL {
		filename = "lachlan.css";
	}

Should work.

cheers.

___
Andrew Lindesay
www.lindesay.co.nz
+64-21-47-0929



_______________________________________________ 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
References: 
 >Re: CSS with WOComponent (From: Andrew Lindesay <email@hidden>)

  • Prev by Date: Re: CSS with WOComponent
  • Next by Date: Sorting
  • Previous by thread: Re: CSS with WOComponent
  • Next by thread: Testing whether an editing context is locked
  • Index(es):
    • Date
    • Thread