• 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: Cascading Style Sheets with WO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cascading Style Sheets with WO


  • Subject: Re: Cascading Style Sheets with WO
  • From: Jonathan Rochkind <email@hidden>
  • Date: Wed, 19 Feb 2003 11:33:39 -0600

You _could_ leave the style sheet out of your project entirely, just put it on a web server somewhere, and generate HTML that's a stylesheet link pointing to that location. But this is kind of cheesy.

You're right that Web Server Resources is probably preferable. To figure out the URL of something in the "Web Server Resources" you can use the WOResourceManager which is accessible from the application's resourceManager() method:

WOApplication.application().resourceManager().urlForResourceNamed("stylesheet.css", "NameOfFramework", null, null);

"NameOfFramework" can be null if it's just in the application itself. The last argument should ideally be the current request, if it's accessible to you (context().request() in component code). But it seems to work for me even if I leave it null. The third argument is a mysterious (to me) language array, which I guess is useful if you are doing localization, but I don't.

I also have some memory of a dynamic element that came with WO that would do some of this stuff for you for stylesheets, but now I can't find it. Not too hard to do yourself by hand as described above, anyhow.

--Jonathan

At 01:33 AM 2/19/2003 -0800, Bambi Nice wrote:
 Hi,

I am using "Style sheets" in WebObjects. It is OK if I use "Internal Style Sheets" but I have problem with "External Style Sheets". Now, the point is that where can I put the "external style sheet" in order to WO can understand. I tried to put it into Resources / Web Server Resources, but ...that licks me!

Many thanks
Yahoo! Shopping - Send Flowers for Valentine's Day
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Cascading Style Sheets with WO (From: Bambi Nice <email@hidden>)

  • Prev by Date: EOModeler custom data types
  • Next by Date: RE: Cascading Style Sheets with WO
  • Previous by thread: Cascading Style Sheets with WO
  • Next by thread: RE: Cascading Style Sheets with WO
  • Index(es):
    • Date
    • Thread