er.extensions.components
Class ERXStyleSheet
java.lang.Object
com.webobjects.appserver.WOElement
com.webobjects.appserver.WOComponent
er.extensions.components.ERXComponent
er.extensions.components.ERXNonSynchronizingComponent
er.extensions.components.ERXStatelessComponent
er.extensions.components.ERXStyleSheet
- All Implemented Interfaces:
- WOActionResults, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, Cloneable
public class ERXStyleSheet
- extends ERXStatelessComponent
Adds a style sheet to a page. You can either supply a complete URL, a file
and framework name or put something in the component content. The content of
the component is cached under a "key" binding and then delivered via a direct
action, so it doesn't need to get re-rendered too often.
- See Also:
- Serialized Form
| Bindings |
filename | name of the style sheet |
framework | name of the framework for the style sheet |
href | url to the style sheet |
key | key to cache the style sheet under when using the component
content. Default is the sessionID. That means, you should *really*
explicitly set a key, when you use more than one ERXStyleSheet using
the component content method within one session |
inline | when true, the generated link tag will be appended inline,
when false it'll be placed in the head of the page, when unset it
will be placed inline for ajax requests and in the head for regular
requests |
| Properties |
er.extensions.ERXStyleSheet.xhtml | (defaults true) if false, link
tags are not closed, which is compatible with older HTML |
|
Field Summary |
static Logger |
log
logging support |
| Methods inherited from class er.extensions.components.ERXComponent |
_awakeInContext, _checkAccess, _frameworkName, _includeCSSResources, _includeJavascriptResources, additionalCSSFiles, additionalJavascriptFiles, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, checkAccess, clickToOpenEnabled, componentName, defaultCSSPath, defaultJavascriptPath, dynamicBindings, floatValueForBinding, intValueForBinding, invokeAction, isPageAccessAllowed, localizer, objectValueForBinding, objectValueForBinding, pageWithName, postAppendToResponse, preAppendToResponse, primaryCSSFile, primaryJavascriptFile, stringValueForBinding, stringValueForBinding, takeValuesFromRequest, useDefaultComponentCSS, useDefaultComponentJavascript |
| Methods inherited from class com.webobjects.appserver.WOComponent |
__valueForBinding, _associationWithName, _childTemplate, _cleanUpStatelessComponent, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, isCachingEnabled, isEventLoggingEnabled, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding |
log
public static final Logger log
- logging support
ERXStyleSheet
public ERXStyleSheet(WOContext aContext)
- Public constructor
- Parameters:
aContext - a context
styleSheetUrl
public String styleSheetUrl()
- returns the complete url to the style sheet.
- Returns:
- style sheet url
styleSheetFrameworkName
public String styleSheetFrameworkName()
- Returns the style sheet framework name either resolved via the binding
framework.
- Returns:
- style sheet framework name
styleSheetName
public String styleSheetName()
- Returns the style sheet name either resolved via the binding filename.
- Returns:
- style sheet name
styleSheetKey
public String styleSheetKey()
- Returns key under which the stylesheet should be placed in the cache. If
no key is given, the session id is used.
- Returns:
- style sheet framework name
mediaType
public String mediaType()
- Returns the media type for this stylesheet
appendToResponse
public void appendToResponse(WOResponse originalResponse,
WOContext wocontext)
- Appends the <link> tag, either by using the style sheet name and
framework or by using the component content and then generating a link to
it.
- Overrides:
appendToResponse in class ERXComponent
shouldCloseLinkTags
public static boolean shouldCloseLinkTags()
- Returns whether or not XHTML link tags should be used. If false, then
link tags will not be closed, which is more compatible with certain
browser parsers. Set the 'er.extensions.ERXStyleSheet.xhtml' to control
this property.
- Returns:
- true of link tags should be closed, false otherwise
Copyright © 2002 – 2007 Project Wonder.