er.extensions.components
Class ERXInlineTemplate
java.lang.Object
com.webobjects.appserver.WOElement
com.webobjects.appserver.WOComponent
er.extensions.components.ERXComponent
er.extensions.components.ERXNonSynchronizingComponent
er.extensions.components.ERXInlineTemplate
- All Implemented Interfaces:
- WOActionResults, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, Cloneable
public class ERXInlineTemplate
- extends ERXNonSynchronizingComponent
ERXInlineTemplate allows to specify a component's template dynamically.
The content which would usually go into the ".html" file within a WOComponent's bundle, is specified using the "html"
binding, the ".wod" part is pecified by the "wod" binding.
When using WOOgnl with "ognl.helperFunctions = true" and "ognl.inlineBindings = true", you can leave out the
WOD part.
When keys are accessed, the component first determines the first element of the path (e.g. key "foo" for path
"foo.bar") and looks, if there is a binding with that key.
If there is such a binding, the value is retrieved and the rest of the keyPath applied to it
(valueForBinding("foo").valueForKeyPath("bar")).
If no such binding is available, the value is stored in a NSMutableDictionary. The remaining keyPath is applied as
above.
When an error occurs, an error message is displayed. The message can be altered using the "errorTemplate" binding.
Optionally, a "cacheKey" (String) can be specified, under which the parsed WOElement will be cached. To allow
updating, a "cacheVersion" (Object) is available. When the version changes, the value is recalculated.
- Author:
- th
- See Also:
- Serialized Form
| Bindings |
HTML | HTML-part of the component (required) |
WOD | WOD-part of the component (optional) |
cacheKey | Key under which to cache the WOElement (optional) |
cacheVersion | Hint to determine if the cached object is up-to-date (optional) |
errorTemplate | Template to use for displaying error messages. Uses {@link ERXSimpleTemplateParser} for display.
Method name and HTML-escaped message are provided by the "method" and "message" keys. (optional) |
| 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, reset, 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, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding |
log
public static Logger log
ERXInlineTemplate
public ERXInlineTemplate(WOContext context)
appendToResponse
public void appendToResponse(WOResponse woresponse,
WOContext wocontext)
- Description copied from class:
ERXComponent
- Calls _checkAccess prior to super.appendToResponse and adds support for
ClickToOpen (TM).
- Overrides:
appendToResponse in class ERXComponent
errorTemplate
public String errorTemplate()
proxyParent
public boolean proxyParent()
takeValueForKeyPath
public void takeValueForKeyPath(Object value,
String keyPath)
- Specified by:
takeValueForKeyPath in interface NSKeyValueCodingAdditions- Overrides:
takeValueForKeyPath in class WOComponent
valueForKeyPath
public Object valueForKeyPath(String keyPath)
- Specified by:
valueForKeyPath in interface NSKeyValueCodingAdditions- Overrides:
valueForKeyPath in class WOComponent
takeValueForKey
public void takeValueForKey(Object obj,
String s)
- Specified by:
takeValueForKey in interface NSKeyValueCoding- Overrides:
takeValueForKey in class WOComponent
valueForKey
public Object valueForKey(String s)
- Specified by:
valueForKey in interface NSKeyValueCoding- Overrides:
valueForKey in class WOComponent
template
public WOElement template()
- Overrides:
template in class WOComponent
Copyright © 2002 – 2007 Project Wonder.