public abstract class ERDCustomComponent extends ERXNonSynchronizingComponent implements ERXExceptionHolder
Has a lot of nifty features including resolving bindings against the rule system and inherits all the value pulling methods from ERXNonSynchronizingComponent
.
Subclasses should be able to run stand alone without a D2W context. This is achieved by pulling values first from the bindings, then from the d2wContext and finally from an "extraBindings" binding.
ERXNonSynchronizingComponent
の値バインディング取得機能等の必要な処理をたくさん含みます。
サブクラスは D2W コンテキスト無しでスタンドアロンで実行可能です。最初はコンポーネント・バインディングを優先で取得を試し、
だめなら、 d2wContext と後は "extraBindings" バインディングより。Name | Description |
---|---|
localContext | - d2wContext (deprecated) |
d2wContext | - d2wContext |
key | - プロパティ・キー |
extraBindings | - オプション・バインディング |
propertyKey | - プロパティ・キー |
Modifier and Type | Class and Description |
---|---|
static interface |
ERDCustomComponent.Keys |
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.MapImplementation, com.webobjects.foundation.NSKeyValueCoding.Null<T>, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException
Modifier and Type | Field and Description |
---|---|
protected Object |
extraBindings
Holds the extra bindings.
|
protected static Integer |
FALSE |
static Logger |
log
logging support
|
protected static Integer |
TRUE |
_dynamicBindings
_Extension, _IsEventLoggingEnabled, _keyAssociations
Constructor and Description |
---|
ERDCustomComponent(com.webobjects.appserver.WOContext context)
Designated constructor
|
Modifier and Type | Method and Description |
---|---|
void |
appendToResponse(com.webobjects.appserver.WOResponse r,
com.webobjects.appserver.WOContext c)
Calls
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent() prior to super.appendToResponse. |
void |
clearValidationFailed()
Implementation of the
ERXExceptionHolder interface. |
boolean |
d2wComponentNameDebuggingEnabled()
Should the component name be shown.
|
com.webobjects.directtoweb.D2WContext |
d2wContext()
The active
D2WContext . |
protected com.webobjects.directtoweb.D2WContext |
d2wContextFromBindings()
Returns the active d2wContext.
|
protected Object |
d2wContextValueForBinding(String binding)
Utility to pull the value from the
D2WContext . |
boolean |
d2wDebuggingEnabled()
Is D2W debugging enabled.
|
D2WPage |
d2wPage()
Finds the containing D2WPage, if possible.
|
boolean |
d2wPropertyKeyDebuggingEnabled()
Should the property keys be shown.
プロパティ・キーを表示する?
|
Object |
extraBindings()
Extra bindings supplied to the component.
|
protected Object |
extraBindingsValueForBinding(String binding)
Utility to pull the value from the extra bindings if supplied.
|
boolean |
hasBinding(String binding)
Checks if the binding can be pulled.
|
Integer |
integerBooleanForBinding(String binding) |
String |
key()
The active property key.
|
com.webobjects.directtoweb.D2WContext |
localContext()
The active
D2WContext . |
protected void |
logDebugInfo()
Utility to dump some debug info about this component and its parent
|
protected Object |
originalValueForBinding(String binding)
Utility to pull the value from the components actual bindings.
|
protected Object |
parentValueForBinding(String binding)
Utility to pull the value from the components parent, if the parent is a D2W wrapper component.
親コンポーネントが D2W ラパー・コンポーネントの場合のバインディング取得ユーティリティ
|
void |
reset()
Used by stateless subclasses.
|
void |
resetCachedBindingsInStatefulComponent()
Used by stateful but non-synching subclasses
|
void |
setD2wContext(com.webobjects.directtoweb.D2WContext value)
Sets the
D2WContext . |
void |
setExtraBindings(Object value)
Sets the extra bindings.
|
void |
setKey(String newKey)
Sets the property key.
|
void |
setLocalContext(com.webobjects.directtoweb.D2WContext value)
Sets the
D2WContext . |
boolean |
synchronizesVariablesWithBindings()
Overridden from superclass to turn on component synching, which is the default.
|
String |
task()
Gets the current D2W task.
|
boolean |
taskIsEdit() |
boolean |
taskIsInspect() |
boolean |
taskIsList() |
void |
validationFailedWithException(Throwable e,
Object value,
String keyPath)
Validation Support.
|
Object |
valueForBinding(String binding)
Fetches an object from the bindings.
|
invokeAction, 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, 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, hasSession, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, setVariableValueForName, sleep, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithName
public static final Logger log
protected Object extraBindings
protected static final Integer TRUE
protected static final Integer FALSE
public ERDCustomComponent(com.webobjects.appserver.WOContext context)
public void setLocalContext(com.webobjects.directtoweb.D2WContext value)
D2WContext
. Applies when used inside a D2WCustomComponent.public void setD2wContext(com.webobjects.directtoweb.D2WContext value)
D2WContext
. Applies when used inside a property key repetition.public com.webobjects.directtoweb.D2WContext localContext()
D2WContext
. Simply calls to d2wContext()
public com.webobjects.directtoweb.D2WContext d2wContext()
D2WContext
.protected com.webobjects.directtoweb.D2WContext d2wContextFromBindings()
public String task()
public boolean taskIsEdit()
public boolean taskIsInspect()
public boolean taskIsList()
public void validationFailedWithException(Throwable e, Object value, String keyPath)
validationFailedWithException
in class com.webobjects.appserver.WOComponent
public void clearValidationFailed()
ERXExceptionHolder
interface. Clears exceptions in the parent if possible.
ERXExceptionHolder
インタフェース実装。可能であれば、親のエラーをクリアします。clearValidationFailed
in interface ERXExceptionHolder
public boolean hasBinding(String binding)
hasBinding
in class com.webobjects.appserver.WOComponent
protected void logDebugInfo()
protected Object parentValueForBinding(String binding)
protected Object originalValueForBinding(String binding)
protected Object d2wContextValueForBinding(String binding)
D2WContext
.
D2WContext
から値を取得するユーティリティprotected Object extraBindingsValueForBinding(String binding)
public Object valueForBinding(String binding)
valueForBinding
in class com.webobjects.appserver.WOComponent
public void resetCachedBindingsInStatefulComponent()
resetCachedBindingsInStatefulComponent
in class ERXNonSynchronizingComponent
public void reset()
reset
in class ERXComponent
public void setExtraBindings(Object value)
public Object extraBindings()
public void setKey(String newKey)
public String key()
public boolean synchronizesVariablesWithBindings()
synchronizesVariablesWithBindings
in class ERXNonSynchronizingComponent
false
public boolean d2wDebuggingEnabled()
public boolean d2wComponentNameDebuggingEnabled()
public boolean d2wPropertyKeyDebuggingEnabled()
public D2WPage d2wPage()
ERD2WPage
to pass information between subcomponents.public void appendToResponse(com.webobjects.appserver.WOResponse r, com.webobjects.appserver.WOContext c)
ERXNonSynchronizingComponent
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent()
prior to super.appendToResponse.appendToResponse
in class ERXNonSynchronizingComponent
r
- to which we are appendingc
- context of the responseCopyright © 2002 – 2020 Project Wonder.