dynamic css
dynamic css
- Subject: dynamic css
- From: Greg Kick <email@hidden>
- Date: Tue, 27 Jul 2004 23:33:34 -0700
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.