public class ERXInlineTemplate extends ERXNonSynchronizingComponent
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 specified 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 there is no binding with that name and "proxyParent" is true, the keyPath is resolved against the parent component.
Otherwise, dynamicBindings (ERXComponent.dynamicBindings()
) are used.
You can switch off the usage of dynamicBindings by setting the binding "defaultToDynamicBindings" to false.
Then a warning will be logged for unknown keys.
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.
Name | Description |
---|---|
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) |
proxyParent | whether to proxy key path lookup to the parent (default is false) |
defaultToDynamicBindings | whether to use dynamicBindings for unknown keys (default is true) |
Modifier and Type | Class and Description |
---|---|
static class |
ERXInlineTemplate.Error |
WOComponent._EventLoggingEnabler, WOComponent.Event
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
Modifier and Type | Field and Description |
---|---|
protected ERXInlineTemplate.Error |
_deferredError |
_dynamicBindings
_Extension, _IsEventLoggingEnabled, _keyAssociations
_CLASS
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
NullValue
_CLASS
Constructor and Description |
---|
ERXInlineTemplate(WOContext context) |
Modifier and Type | Method and Description |
---|---|
void |
appendToResponse(WOResponse woresponse,
WOContext wocontext)
Calls
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent() prior to super.appendToResponse. |
boolean |
defaultToDynamicBindings() |
String |
errorTemplate() |
boolean |
proxyParent() |
void |
takeValueForKey(Object obj,
String s) |
void |
takeValueForKeyPath(Object value,
String keyPath) |
WOElement |
template() |
Object |
valueForKey(String s) |
Object |
valueForKeyPath(String keyPath) |
invokeAction, resetCachedBindingsInStatefulComponent, synchronizesVariablesWithBindings, takeValuesFromRequest
_awakeInContext, _checkAccess, _frameworkName, _includeCSSResources, _includeJavascriptResources, additionalCSSFiles, additionalJavascriptFiles, arrayValueForBinding, arrayValueForBinding, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, browser, checkAccess, clickToOpenEnabled, componentName, defaultCSSPath, defaultJavascriptPath, dynamicBindings, floatValueForBinding, intValueForBinding, isPageAccessAllowed, localizer, objectValueForBinding, objectValueForBinding, pageWithName, postAppendToResponse, preAppendToResponse, primaryCSSFile, primaryJavascriptFile, reset, shouldCheckAccess, stringValueForBinding, stringValueForBinding, useDefaultComponentCSS, useDefaultComponentJavascript
__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, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, setVariableValueForName, sleep, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithName
protected ERXInlineTemplate.Error _deferredError
public ERXInlineTemplate(WOContext context)
public void appendToResponse(WOResponse woresponse, WOContext wocontext)
ERXNonSynchronizingComponent
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent()
prior to super.appendToResponse.appendToResponse
in class ERXNonSynchronizingComponent
woresponse
- to which we are appendingwocontext
- context of the responsepublic String errorTemplate()
public boolean proxyParent()
public boolean defaultToDynamicBindings()
public void takeValueForKeyPath(Object value, String keyPath)
takeValueForKeyPath
in interface NSKeyValueCodingAdditions
takeValueForKeyPath
in class WOComponent
public Object valueForKeyPath(String keyPath)
valueForKeyPath
in interface NSKeyValueCodingAdditions
valueForKeyPath
in class WOComponent
public void takeValueForKey(Object obj, String s)
takeValueForKey
in interface NSKeyValueCoding
takeValueForKey
in class WOComponent
public Object valueForKey(String s)
valueForKey
in interface NSKeyValueCoding
valueForKey
in class WOComponent
public WOElement template()
template
in class WOComponent
Copyright © 2002 – 2024 Project Wonder.