----- Original Message -----
Sent: Friday, May 13, 2005 12:52 PM
Subject: Re: Style Sheets in
WebObjects
Wonder has ERXStyleSheet, but it isn't a stateless component
... It's pretty simple to make your own if you want though. Here's the
one I use:
import
com.webobjects.appserver.WOElement;
import
com.webobjects.appserver._private.WOConstantValueAssociation;
import
com.webobjects.appserver._private.WOHTMLURLValuedElement;
import
com.webobjects.foundation.NSDictionary;
public
class
MDTStyleSheet extends
WOHTMLURLValuedElement {
public MDTStyleSheet(String _name, NSDictionary
_assocationsDictionary, WOElement _template) {
super("link",
_assocationsDictionary, _template);
if
(_associations.objectForKey("rel") == null)
{
_associations.setObjectForKey(new WOConstantValueAssociation("stylesheet"), "rel");
}
if
(_associations.objectForKey("type") == null)
{
_associations.setObjectForKey(new WOConstantValueAssociation("text/css"), "type");
}
}
protected String urlAttributeName() {
return
"href";
}
}