ERDCustomComponent Class Reference

Inherits er::extensions::components::ERXNonSynchronizingComponent, and er::extensions::validation::ERXExceptionHolder.

Inherited by AjaxNotificationCenter, AjaxObservingSwitch, PageHeader, ERCDisplayHelpText, ERDActionButton, ERDBannerComponent, ERDCustomEditComponent, ERDCustomQueryComponent, ERDQuickSearch, ERDEmptyListMessage, ERDSectionImage, ERDSectionText, ERDSpacer, ERDTabText, ERDAttributeRepetition, ERDDisplayTemplateString, ERMDActionButton, ERMD2WTableHeader, ERMDBatchSizeControl, and ERMD2WHeader.

Collaboration diagram for ERDCustomComponent:

Collaboration graph
[legend]

List of all members.

Classes

interface  Keys

Public Member Functions

void appendToResponse (WOResponse r, WOContext c)
boolean booleanForBinding (String binding)
void clearValidationFailed ()
boolean d2wComponentNameDebuggingEnabled ()
D2WContext d2wContext ()
boolean d2wDebuggingEnabled ()
D2WPage d2wPage ()
boolean d2wPropertyKeyDebuggingEnabled ()
 ERDCustomComponent (WOContext context)
Object extraBindings ()
boolean hasBinding (String binding)
Integer integerBooleanForBinding (String binding)
String key ()
D2WContext localContext ()
void reset ()
void resetCachedBindingsInStatefulComponent ()
void setD2wContext (D2WContext value)
void setExtraBindings (Object value)
void setKey (String newKey)
void setLocalContext (D2WContext value)
boolean synchronizesVariablesWithBindings ()
String task ()
boolean taskIsEdit ()
boolean taskIsInspect ()
boolean taskIsList ()
void validationFailedWithException (Throwable e, Object value, String keyPath)
Object valueForBinding (String binding)

Static Public Attributes

static final Logger log = Logger.getLogger(ERDCustomComponent.class)

Protected Member Functions

D2WContext d2wContextFromBindings ()
Object d2wContextValueForBinding (String binding)
Object extraBindingsValueForBinding (String binding)
void logDebugInfo ()
Object originalValueForBinding (String binding)
Object parentValueForBinding (String binding)

Protected Attributes

Object extraBindings

Static Protected Attributes

static final Integer FALSE = ERXConstant.ZeroInteger
static final Integer TRUE = ERXConstant.OneInteger

Private Attributes

D2WContext d2wContext
String key
String task


Detailed Description

Base class of many custom components.
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.

Constructor & Destructor Documentation

ERDCustomComponent ( WOContext  context  ) 

Designated constructor


Member Function Documentation

void appendToResponse ( WOResponse  response,
WOContext  context 
)

Calls resetCachedBindingsInStatefulComponent prior to super.appendToResponse.

Parameters:
response to which we are appending
context context of the response

Reimplemented from ERXNonSynchronizingComponent.

Reimplemented in ERDEditDateJavascript, ERDQuickSearch, ERDListOrganizer, ERDAttributeRepetition, ERDEditHTML, and ERDEditPassword.

boolean booleanForBinding ( String  binding  ) 

void clearValidationFailed (  ) 

Implementation of the ERXExceptionHolder interface. Clears exceptions in the parent if possible.

Implements ERXExceptionHolder.

boolean d2wComponentNameDebuggingEnabled (  ) 

Should the component name be shown.

D2WContext d2wContext (  ) 

The active D2WContext.

Reimplemented in ERD2WPick.

D2WContext d2wContextFromBindings (  )  [protected]

Returns the active d2wContext. If the value was not set via KVC, tries to get the value from the bindings if the component is non-syncing

Object d2wContextValueForBinding ( String  binding  )  [protected]

Utility to pull the value from the D2WContext.

boolean d2wDebuggingEnabled (  ) 

Is D2W debugging enabled.

D2WPage d2wPage (  ) 

Finds the containing D2WPage, if possible. There are certain situations when having a reference to the containing D2W page is useful, e.g., when needing to use the userInfo dictionary of ERD2WPage to pass information between subcomponents.

Returns:
the containing D2WPage

boolean d2wPropertyKeyDebuggingEnabled (  ) 

Should the property keys be shown.

Object extraBindings (  ) 

Extra bindings supplied to the component. If this is a dictionary, it will be used for additional bindings.

Object extraBindingsValueForBinding ( String  binding  )  [protected]

Utility to pull the value from the extra bindings if supplied.

boolean hasBinding ( String  binding  ) 

Checks if the binding can be pulled. If the component is synching, throws an Exception. Otherwise checks the superclass and if the value for the binding is not null.

Integer integerBooleanForBinding ( String  binding  ) 

String key (  ) 

The active property key.

Reimplemented in ERCDisplayHelpText, ERMDEditRelationship, and ERMD2WHeader.

D2WContext localContext (  ) 

The active D2WContext. Simply calls to d2wContext()

void logDebugInfo (  )  [protected]

Utility to dump some debug info about this component and its parent

Object originalValueForBinding ( String  binding  )  [protected]

Utility to pull the value from the components actual bindings.

Object parentValueForBinding ( String  binding  )  [protected]

Utility to pull the value from the components parent, if the parent is a D2W wrapper component.

void reset (  ) 

void resetCachedBindingsInStatefulComponent (  ) 

Used by stateful but non-synching subclasses

Reimplemented from ERXNonSynchronizingComponent.

Reimplemented in ERDCustomEditComponent.

void setD2wContext ( D2WContext  value  ) 

Sets the D2WContext. Applies when used inside a property key repetition.

Reimplemented in AjaxNotificationCenter.

void setExtraBindings ( Object  value  ) 

Sets the extra bindings.

void setKey ( String  newKey  ) 

Sets the property key.

void setLocalContext ( D2WContext  value  ) 

Sets the D2WContext. Applies when used inside a D2WCustomComponent.

boolean synchronizesVariablesWithBindings (  ) 

String task (  ) 

Gets the current D2W task.

Reimplemented in ERDActionButton, and ERDEditToManyRelationship.

boolean taskIsEdit (  ) 

boolean taskIsInspect (  ) 

boolean taskIsList (  ) 

void validationFailedWithException ( Throwable  e,
Object  value,
String  keyPath 
)

Validation Support. Passes errors to the parent.

Reimplemented in ERDControllerButton, and ERDActionBar.

Object valueForBinding ( String  binding  ) 

Fetches an object from the bindings. Tries the actual supplied bindings, the supplied d2wContext, the parent and finally the extra bindings dictionary.

Reimplemented in ERDList.


Member Data Documentation

D2WContext d2wContext [private]

Holds the D2WContext.

Object extraBindings [protected]

Holds the extra bindings.

Reimplemented in ERDEditFile.

final Integer FALSE = ERXConstant.ZeroInteger [static, protected]

String key [private]

Holds the property key.

Reimplemented in ERDQueryDateRangeJavascript.

final Logger log = Logger.getLogger(ERDCustomComponent.class) [static]

String task [private]

Holds the current D2W task.

final Integer TRUE = ERXConstant.OneInteger [static, protected]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:51 2012 for Project Wonder by  doxygen 1.5.8