• 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: dynamic css
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dynamic css


  • Subject: Re: dynamic css
  • From: Michael Engelhart <email@hidden>
  • Date: Wed, 28 Jul 2004 08:56:34 -0500

I'm not sure what you mean by the image being "part of the application" and used in a stylesheet. Is it an image that's stored in the database or on the filesystem?

Mike
On Jul 28, 2004, at 1:33 AM, Greg Kick wrote:

I've been trying to figure out how to deal with CSS in WO for a while.
The problem I was having was that I have an image that I want to be
part of the application but also want to be referenced in the
stylesheet for use as a background.  What I ended up doing was creating
a component that ends up being the stylesheet by making it a partial
document to eliminate the html.  I then use strings to fill in the
dynamic parts using the following method:

     public String logoURL()
     {
         WOContext aContext = context();
         WOResourceManager rm = application().resourceManager();
         return rm.urlForResourceNamed( "logo.gif",
				       "app",
				       aContext.session().languages(),
				       aContext.request() );
     }

I then use a WOGenericElement to insert the link tag and have the href
point to a direct action that returns the css component.

It works, but seems like it's probably the most ridiculous way to do it
ever.  Anybody have any ideas on how to clean it up?  Thanks.

Greg
_______________________________________________
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.


  • Follow-Ups:
    • Re: dynamic css
      • From: Jerry Porter <email@hidden>
References: 
 >dynamic css (From: Greg Kick <email@hidden>)

  • Prev by Date: White spaces are required between publicId and systemId
  • Next by Date: Re: White spaces are required between publicId and systemId
  • Previous by thread: dynamic css
  • Next by thread: Re: dynamic css
  • Index(es):
    • Date
    • Thread