• 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: A want to add cascading style sheets to my WebObjects HTML Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A want to add cascading style sheets to my WebObjects HTML Application


  • Subject: Re: A want to add cascading style sheets to my WebObjects HTML Application
  • From: Kaj Hejer <email@hidden>
  • Date: Sat, 30 Nov 2002 10:51:43 +0100

At 20:29 -0500 29-11-02, Thomas Peters wrote:
>HI All,
>
>A want to add cascading style sheets to my WebObjects HTML Application.
>
>I added my 'style.css' file to my project but the application can not find the
>file and I get a FileNotFoundException when I add the <LINK.. tag to my
>WebObjects component HTML page.
>

Hi!

One way of doing this is to add a WOGenericElement inside <head></head> of
your document wnd define this WOGenericElement as

cssLinkGeneric: WOGenericElement {
	href = cssLink;
	rel = "stylesheet";
	elementName = "link";
}

To make it easier to insert this tag you might want to turn on "top level
tags" in WOBuilder->Preferences->Layout.

Then you create a method that gives you the url for the css:

  public String cssLink() {
      WOResourceManager rm = getApplication().resourceManager();
      String url =
          rm.urlForResourceNamed("medark.css", null, null,
context().request());
      return url;
  }


Here this css-file in the project is named "medark.css". You have to add
this file to Web Server Resources in ProjectBuilder.



-Kaj :)
_______________________________________________
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: 
 >A want to add cascading style sheets to my WebObjects HTML Application (From: "Thomas Peters" <email@hidden>)

  • Prev by Date: I want to add a ScriptMap for my WebObjects URLs...
  • Previous by thread: A want to add cascading style sheets to my WebObjects HTML Application
  • Next by thread: I want to add a ScriptMap for my WebObjects URLs...
  • Index(es):
    • Date
    • Thread