Project Wonder 2.0

er.extensions
Class ERXNonSynchronizingComponent

java.lang.Object
  extended bycom.webobjects.appserver.WOElement
      extended bycom.webobjects.appserver.WOComponent
          extended byer.extensions.ERXNonSynchronizingComponent
All Implemented Interfaces:
Cloneable, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, WOActionResults
Direct Known Subclasses:
EGWrapper, ERDCustomComponent, ERXCheckboxMatrix, ERXLongResponse, ERXNonSychronizingComponent, ERXStatelessComponent

public abstract class ERXNonSynchronizingComponent
extends WOComponent

Abstract non-synchronizing component used as the super class for a number of components within the ER frameworks. Adds a number of nice binding resolution methods.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.webobjects.appserver.WOComponent
WOComponent._EventLoggingEnabler, WOComponent.Event
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes inherited from class com.webobjects.foundation.NSValidation
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Field Summary
 NSMutableDictionary _dynamicBindings
           
 
Fields inherited from class com.webobjects.appserver.WOComponent
_Extension, _IsEventLoggingEnabled, _keyAssociations
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
_CLASS, NullValue
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSValidation
_CLASS
 
Constructor Summary
ERXNonSynchronizingComponent(WOContext context)
          Public constructor
 
Method Summary
 boolean booleanValueForBinding(String binding)
          Resolves a given binding as a boolean value.
 boolean booleanValueForBinding(String binding, boolean defaultValue)
          Resolves a given binding as a boolean value.
 boolean booleanValueForBinding(String binding, ERXUtilities.BooleanOperation defaultValue)
          Resolves a given binding as a boolean value with the option of specifing a boolean operator as the default value.
 NSMutableDictionary dynamicBindings()
           
 int intValueForBinding(String binding, int defaultValue)
          Resolves a given binding as a int value.
 boolean isStateless()
          component is not stateless
 ERXLocalizer localizer()
           
 Object objectValueForBinding(String binding)
          Resolves a given binding as an object in the normal fashion of calling valueForBinding.
 Object objectValueForBinding(String binding, Object defaultValue)
          Resolves a given binding as an object in the normal fashion of calling valueForBinding.
 String stringValueForBinding(String binding)
          Retrieves a given binding and if it is not null then returns toString called on the bound object.
 String stringValueForBinding(String binding, String defaultValue)
          Retrieves a given binding and if it is not null then returns toString called on the bound object.
 boolean synchronizesVariablesWithBindings()
          component does not synchronize variables
 
Methods inherited from class com.webobjects.appserver.WOComponent
_associationWithName, _awakeInContext, _childTemplate, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, appendToResponse, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_dynamicBindings

public NSMutableDictionary _dynamicBindings
Constructor Detail

ERXNonSynchronizingComponent

public ERXNonSynchronizingComponent(WOContext context)
Public constructor

Method Detail

dynamicBindings

public NSMutableDictionary dynamicBindings()

synchronizesVariablesWithBindings

public boolean synchronizesVariablesWithBindings()
component does not synchronize variables


isStateless

public boolean isStateless()
component is not stateless


intValueForBinding

public int intValueForBinding(String binding,
                              int defaultValue)
Resolves a given binding as a int value. Useful for image sizes and the like.

Parameters:
binding - binding to be resolved as a int value.
defaultValue - default int value to be used if the binding is not bound.
Returns:
result of evaluating binding as a int.

booleanValueForBinding

public boolean booleanValueForBinding(String binding)
Resolves a given binding as a boolean value. Defaults to false.

Parameters:
binding - binding to be resolved as a boolean value.
Returns:
result of evaluating binding as a boolean.

booleanValueForBinding

public boolean booleanValueForBinding(String binding,
                                      boolean defaultValue)
Resolves a given binding as a boolean value.

Parameters:
binding - binding to be resolved as a boolean value.
defaultValue - default boolean value to be used if the binding is not bound.
Returns:
result of evaluating binding as a boolean.

booleanValueForBinding

public boolean booleanValueForBinding(String binding,
                                      ERXUtilities.BooleanOperation defaultValue)
Resolves a given binding as a boolean value with the option of specifing a boolean operator as the default value.

Parameters:
binding - name of the component binding.
defaultValue - boolean operator to be evaluated if the binding is not present.
Returns:
result of evaluating binding as a boolean.

objectValueForBinding

public Object objectValueForBinding(String binding)
Resolves a given binding as an object in the normal fashion of calling valueForBinding. This has the one advantage of being able to resolve the resulting object as a {link ERXUtilities$Operation} if it is an Operation and then returning the result as the evaluation of that operation.

Parameters:
binding - name of the component binding.
Returns:
the object for the given binding and in the case that it is an instance of an Operation the value of that operation.

objectValueForBinding

public Object objectValueForBinding(String binding,
                                    Object defaultValue)
Resolves a given binding as an object in the normal fashion of calling valueForBinding. This has the one advantage of being able to resolve the resulting object as a {link ERXUtilities$Operation} if it is an Operation and then returning the result as the evaluation of that operation.

Parameters:
binding - name of the component binding.
defaultValue - value to be used if valueForBinding returns null.
Returns:
the object for the given binding and in the case that it is an instance of an Operation the value of that operation.

stringValueForBinding

public String stringValueForBinding(String binding)
Retrieves a given binding and if it is not null then returns toString called on the bound object.

Parameters:
binding - to be resolved
Returns:
resolved binding in string format

stringValueForBinding

public String stringValueForBinding(String binding,
                                    String defaultValue)
Retrieves a given binding and if it is not null then returns toString called on the bound object.

Parameters:
binding - to be resolved
defaultValue - value to be used if valueForBinding returns null.
Returns:
resolved binding in string format

localizer

public ERXLocalizer localizer()

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.