public abstract class ERD2WPage extends D2WPage implements ERXExceptionHolder, ERDUserInfoInterface, ERXComponentActionRedirector.Restorable, ERDBranchInterface
ERDBranchDelegate, then all of the
 code for actions can be handled in your delegate.| Name | Description | 
|---|---|
| object | object | 
| localContext | localContext | 
| keyPathsWithValidationExceptions | keyPathsWithValidationExceptions | 
| shouldPropagateExceptions | shouldPropagateExceptions | 
| shouldCollectionValidationExceptions | shouldCollectionValidationExceptions | 
| shouldSetFailedValidationValue | shouldSetFailedValidationValue | 
| errorMessages | errorMessages | 
| componentName | componentName | 
| customComponentName | customComponentName | 
| propertyKey | propertyKey | 
| sectionKey | sectionKey | 
| sectionContents | sectionContents | 
| tabKey | tabKey | 
| displayNameForTabKey | displayNameForTabKey | 
| isEntityEditable | isEntityEditable | 
| pageConfiguration | pageConfiguration | 
| displayPropertyKeys | displayPropertyKeys | 
| tabSectionsContents | tabSectionsContents | 
| displayVariant | displayVariant | 
| displayNameForEntity | displayNameForEntity | 
| nextPageDelegate | nextPageDelegate | 
| pageController | pageController | 
| pageWrapperName | pageWrapperName | 
| inlineStyle | inlineStyle | 
| Modifier and Type | Class and Description | 
|---|---|
| static interface  | ERD2WPage.Keysinterface for all the keys used in this pages code | 
| static class  | ERD2WPage.ValidationDelegate | 
WOComponent._EventLoggingEnabler, WOComponent.EventNSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.UtilityNSKeyValueCoding._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.ValueAccessorNSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException| Modifier and Type | Field and Description | 
|---|---|
| protected static NSMutableSet<String> | _allConfigurations | 
| protected NSDictionary | _branchholds the chosen branch | 
| protected EOEditingContext | _contextEOEditingContextfor the current object | 
| protected WOComponent | _nextPage | 
| protected com.webobjects.directtoweb.NextPageDelegate | _nextPageDelegate | 
| protected ERDBranchDelegateInterface | _pageControllerHolds the page controller for this page. | 
| protected NSMutableDictionary | _userInfoHolds the user info. | 
| protected NSMutableArray | errorKeyOrder | 
| protected String | errorMessage | 
| protected NSMutableDictionary | errorMessages | 
| protected NSMutableArray<String> | keyPathsWithValidationExceptions | 
| static org.apache.log4j.Logger | loglogging support | 
| protected ERD2WPage.ValidationDelegate | validationDelegate | 
| protected boolean | validationDelegateInited | 
| static org.apache.log4j.Logger | validationLog | 
_eo, _localContext, currentObjectKey_Extension, _IsEventLoggingEnabled, _keyAssociations_CLASS_CLASS, _KeyPathSeparatorChar, KeyPathSeparatorNullValue_CLASS| Constructor and Description | 
|---|
| ERD2WPage(WOContext c)Default public constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| long | aggregateEventDurationForCurrentPropertyKey()Gets the aggregate duration of events sharing the current property key. | 
| static NSArray<String> | allConfigurationNames()Collects the names of all page configurations as you walk through your
 application. | 
| void | appendToResponse(WOResponse response,
                WOContext context)Overridden from the parent for better logging. | 
| void | awake()Overridden to lock the page's editingContext, if there is any present. | 
| NSDictionary | branch()Cover method for getting the choosen branch. | 
| NSArray | branchChoices()Calculates the branch choices for the current page. | 
| String | branchName()Implementation of the  ERDBranchDelegate. | 
| protected void | clearTabSectionsContents()If you switch the context out from under a wizard page it will hold onto the keys in the tab
 sections and blow up the next time you use it if the entity has changed. | 
| void | clearValidationFailed()Clears all of the collected validation exceptions. | 
| boolean | clickToOpenEnabled(WOResponse response,
                  WOContext context)Returns whether or not click-to-open should be enabled for this component. | 
| String | cssClassForPageContainerElement()Gets the CSS class(es) for the container element, based on the current entity and task. | 
| String | cssClassForPropertyKey()Gets the CSS class(es) that should be applied to the current property key container element. | 
| String | cssClassForPropertyName()Gets the CSS class(es) that should be applied to the current property name container element. | 
| ERD2WContainer | currentSection()The current section of display keys. | 
| NSArray | currentSectionKeys()The display keys for the current section. | 
| ERD2WContainer | currentTab()Returns the  ERD2WContainerdefining the current tab. | 
| boolean | d2wComponentNameDebuggingEnabled()Checks is component names should be shown. | 
| com.webobjects.directtoweb.D2WContext | d2wContext()D2WContextfor this page. | 
| String | d2wCurrentComponentName()Helper to return the actual current component name, even when wrapped in
 a custom component. | 
| boolean | d2wDebuggingEnabled()Checks if basic debugging is on | 
| String | descriptionForResponse(WOResponse aResponse,
                      WOContext aContext)This will allow d2w pages to be listed on a per configuration basis in
 stats collecting. | 
| String | displayVariant()Gets the  displayVariantfor the current property key. | 
| EOEditingContext | editingContext() | 
| NSArray | errorKeyOrder() | 
| String | errorMessage() | 
| String | errorMessageForPropertyKey() | 
| NSMutableDictionary | errorMessages() | 
| boolean | hasActualChanges()Returns true if the EC has "real" changes (processRecentChanges was called) | 
| boolean | hasBranchChoices()Determines if this message page should display branch choices. | 
| boolean | hasErrors() | 
| boolean | hasValidationExceptionForPropertyKey()Checks if there is a validation exception in the D2WContext for the
 current property key. | 
| String | inlineStyleDeclarationForPropertyKey()Gets any inline style declarations for the current property key container element. | 
| String | inlineStyleDeclarationForPropertyName()Gets any inline style declarations for the current property name container element. | 
| WOActionResults | invokeAction(WORequest r,
            WOContext c)Overridden from the parent for better logging. | 
| boolean | isEmbedded() | 
| boolean | isEntityEditable()If the key  isEntityEditableis set, then this value is
 used, otherwise the value from the super implementation, which checks if
 the entity is not in the list ofreadOnlyEntityNames. | 
| boolean | isEntityReadOnly()True if the entity is read only. | 
| boolean | isKeyOmitted()Determines if display of the current property key should be  omitted. | 
| boolean | isObjectDeleteable()Checks if the current object can be deleted. | 
| boolean | isObjectEditable()Checks if the current object can be edited. | 
| boolean | isObjectInspectable()Checks if the current object can be viewed. | 
| boolean | isTopLevelPage() | 
| ERXStats.LogEntry | latestEntryForCurrentPropertyKey()Gets the latest metrics event for the current property key. | 
| protected String | makeStatsKey(String key)Makes the stats key, prepending a prefix to identify the stats to the originating page. | 
| WOComponent | nextPage() | 
| com.webobjects.directtoweb.NextPageDelegate | nextPageDelegate()Returns the page's  NextPageDelegate,
 if any, checking for a "nextPageDelegate" binding if no delegate
 has been explicitly set. | 
| protected WOComponent | nextPageFromDelegate()Checks if the delegate is present and can be invoked, then returns the
 page from it. | 
| NSTimestamp | now() | 
| EOEnterpriseObject | object()Return the object from the d2wContext. | 
| ERDBranchDelegateInterface | pageController()Returns the pageController for this page. | 
| <T extends WOComponent> | pageWithName(Class<T> componentClass)This variant of pageWithName provides a Java5 genericized version of the
 original pageWithName. | 
| String | pageWrapperName()Gets the name of the page wrapper component. | 
| NSArray | sectionsContents()The array of sections. | 
| NSArray | sectionsForCurrentTab()Returns the sections on the current tab. | 
| WOComponent | self()Can be used to get this instance into KVC | 
| void | setBranch(NSDictionary branch)Sets the user chosen branch. | 
| void | setCurrentSection(ERD2WContainer value)Sets the current section of display keys. | 
| void | setCurrentTab(ERD2WContainer value)Sets the current tab. | 
| void | setD2wContext(com.webobjects.directtoweb.D2WContext newValue)Key-Value-Coding needs this method. | 
| void | setDataSource(EODataSource eodatasource) | 
| void | setEditingContext(EOEditingContext newEditingContext)Sets the page's editingContext, automatically locking/unlocking it. | 
| void | setErrorMessage(String message) | 
| void | setErrorMessages(NSMutableDictionary value) | 
| void | setLocalContext(com.webobjects.directtoweb.D2WContext newValue)Sets the d2wContext for this page | 
| void | setNextPage(WOComponent wocomponent) | 
| void | setNextPageDelegate(com.webobjects.directtoweb.NextPageDelegate nextpagedelegate) | 
| void | setObject(EOEnterpriseObject eo)Implementation of the  InspectPageInterface | 
| void | setPageController(ERDBranchDelegateInterface aPageController) | 
| NSDictionary | settings() | 
| void | setValidationDelegate(ERD2WPage.ValidationDelegate delegate) | 
| boolean | shouldCollectValidationExceptions()Should exceptions also be handled here or only handled by the parent. | 
| boolean | shouldDisplayDetailedPageMetrics()Determines whether the component should display the detailed "inline" page metrics. | 
| boolean | shouldDisplayPageMetricsSummary()Determines whether the component should display the page metrics summary. | 
| boolean | shouldPropagateExceptions()Should exceptions be propagated through to the parent page. | 
| boolean | shouldSetFailedValidationValue()Should incorrect values still be set into the EO. | 
| boolean | showCancel() | 
| void | sleep()Overridden to unlock the page's editingContext, if there is any present. | 
| NSDictionary | statsForPage()Gets the stats for the current page. | 
| String | statsKeyForCurrentPropertyKey()Creates a stats key to identify stats to the current property key. | 
| String | statsKeyPrefix()A stats key prefix that guarantees the stats will be identifiable to this instance. | 
| NSArray<ERD2WContainer> | tabSectionsContents()Returns the array of  ERD2WContainerdefining the tabs. | 
| protected static NSArray | tabSectionsContentsFromRuleResult(NSArray tabSectionContentsFromRule)Helper method to calculate the tab key array | 
| void | takeValuesFromRequest(WORequest r,
                     WOContext c)Overridden from the parent for better logging. | 
| String | urlForCurrentState()Implementation of the  ERXComponentActionRedirector.Restorableinterface. | 
| NSMutableDictionary | userInfo()Implementation of the  ERDUserInfoInterface | 
| protected Object | userPreferencesValueForKey(String key)Utility method to get a value from the user prefs. | 
| protected Object | userPreferencesValueForPageConfigurationKey(String key)Utility method to get a value for the current page configuration from the
 user prefs. | 
| ERD2WPage.ValidationDelegate | validationDelegate() | 
| void | validationFailedWithException(Throwable e,
                             Object value,
                             String keyPath)Handles validation errors. | 
alternateRowColor, dataSource, extraBindings, replacementAssociationForAssociation, setExtraBindingsallEntities, allowCollapsing, applicationPort, assistantPort, attribute, backgroundColorForHeaderRow, backgroundColorForPage, backgroundColorForTable, backgroundColorForTableDark, backgroundColorForTableLight, color, currentSettings, currentUrl, d2wContextVisibleEntityNamesCountPlus1, defaultRowspan, displayNameForKeyWhenRelationship, displayNameForProperty, displayPropertyKeys, dynamicPages, entity, entityName, formatter, generationReplacementFor, generationReplacementForCurrentObject, hasCustomKey, hasEntity, hasNoColor, homeClicked, homeHref, isEditing, isEntityReadOnly, isLiveAssistantEnabled, isNotBoldAsBoolean, isNotItalicAsBoolean, isPropertyAnAttribute, isWebAssistantActive, isWebAssistantConnected, isWebAssistantEnabled, keyForGenerationReplacementForVariableNamed, keyWhenRelationship, lastUrl, length, localContext, logout, objectPropertyValue, objectPropertyValueIsNonNull, pageTitle, property, propertyKey, propertyValueClassName, relationship, resourcePathURL, sessionID, setCurrentSettings, setDynamicPages, setEntities, setEntity, setEntityName, setPropertyKey, setResourcePathURL, setTask, setTasks, showBanner, showWebAssistant, submitActionName, target, task, tasks, visibleEntityNames__valueForBinding, _associationWithName, _awakeInContext, _childTemplate, _cleanUpStatelessComponent, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, setVariableValueForName, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithNamepublic static final org.apache.log4j.Logger log
public static final org.apache.log4j.Logger validationLog
protected EOEditingContext _context
EOEditingContext for the current objectprotected NSMutableDictionary errorMessages
protected NSMutableArray errorKeyOrder
protected NSMutableArray<String> keyPathsWithValidationExceptions
protected String errorMessage
protected ERD2WPage.ValidationDelegate validationDelegate
protected boolean validationDelegateInited
protected NSMutableDictionary _userInfo
protected static final NSMutableSet<String> _allConfigurations
protected NSDictionary _branch
protected WOComponent _nextPage
protected com.webobjects.directtoweb.NextPageDelegate _nextPageDelegate
protected ERDBranchDelegateInterface _pageController
public ERD2WPage(WOContext c)
c - current context.public void awake()
awake in class WOComponentpublic boolean clickToOpenEnabled(WOResponse response, WOContext context)
response - the responsecontext - the contextprotected Object userPreferencesValueForKey(String key)
key - protected Object userPreferencesValueForPageConfigurationKey(String key)
key - public void sleep()
sleep in class WOComponentpublic void setEditingContext(EOEditingContext newEditingContext)
newEditingContext - new EOEditingContextpublic EOEditingContext editingContext()
public boolean hasActualChanges()
public String urlForCurrentState()
ERXComponentActionRedirector.Restorable
 interface. This implementation creates an URL with the name of the
 current pageConfiguration as a direct action, which assumes a
 ERD2WDirectAction as the default direct action. Subclasses need
 to implement more sensible behaviour.urlForCurrentState in interface ERXComponentActionRedirector.Restorablepublic void setObject(EOEnterpriseObject eo)
InspectPageInterfacesetObject in class com.webobjects.directtoweb.D2WComponentpublic EOEnterpriseObject object()
object in class com.webobjects.directtoweb.D2WComponentpublic void setDataSource(EODataSource eodatasource)
setDataSource in class D2WPagepublic final WOComponent self()
public com.webobjects.directtoweb.D2WContext d2wContext()
D2WContext for this page. Checks if there is a "d2wContext"
 binding, too.d2wContext in class com.webobjects.directtoweb.D2WComponentpublic void setD2wContext(com.webobjects.directtoweb.D2WContext newValue)
public void setLocalContext(com.webobjects.directtoweb.D2WContext newValue)
setLocalContext in class com.webobjects.directtoweb.D2WComponentpublic NSMutableDictionary errorMessages()
public void setErrorMessages(NSMutableDictionary value)
public String errorMessage()
public void setErrorMessage(String message)
public boolean hasErrors()
public NSArray errorKeyOrder()
public boolean shouldPropagateExceptions()
public boolean shouldCollectValidationExceptions()
public void clearValidationFailed()
ERXExceptionHolder interface.clearValidationFailed in interface ERXExceptionHolderpublic boolean shouldSetFailedValidationValue()
public void validationFailedWithException(Throwable e, Object value, String keyPath)
validationFailedWithException in class WOComponentpublic ERD2WPage.ValidationDelegate validationDelegate()
public void setValidationDelegate(ERD2WPage.ValidationDelegate delegate)
public String errorMessageForPropertyKey()
public boolean isObjectEditable()
public boolean isObjectDeleteable()
public boolean isObjectInspectable()
public boolean isEntityReadOnly()
!(isEntityEditable()) isEntityReadOnly in class com.webobjects.directtoweb.D2WComponentpublic boolean isEntityEditable()
isEntityEditable is set, then this value is
 used, otherwise the value from the super implementation, which checks if
 the entity is not in the list of readOnlyEntityNames.public boolean hasValidationExceptionForPropertyKey()
public NSMutableDictionary userInfo()
ERDUserInfoInterfaceuserInfo in interface ERDUserInfoInterfacepublic boolean d2wDebuggingEnabled()
public boolean d2wComponentNameDebuggingEnabled()
public String d2wCurrentComponentName()
public String descriptionForResponse(WOResponse aResponse, WOContext aContext)
descriptionForResponse in class D2WPagepublic void takeValuesFromRequest(WORequest r, WOContext c)
takeValuesFromRequest in class WOComponentpublic WOActionResults invokeAction(WORequest r, WOContext c)
invokeAction in class WOComponentpublic static NSArray<String> allConfigurationNames()
public void appendToResponse(WOResponse response, WOContext context)
appendToResponse in class WOComponentpublic NSDictionary branch()
public void setBranch(NSDictionary branch)
branch - chosen by user.public String branchName()
ERDBranchDelegate. Gets
 the user selected branch name.branchName in interface ERDBranchInterfacepublic NSArray branchChoices()
branchChoicesForContext on
 the current ERDBranchDelegate.public boolean hasBranchChoices()
public ERD2WContainer currentSection()
public void setCurrentSection(ERD2WContainer value)
public NSArray currentSectionKeys()
ERD2WContainer holding the keys for the current
         sectionpublic NSArray sectionsContents()
ERD2WContainer holding the keys.public NSArray<ERD2WContainer> tabSectionsContents()
ERD2WContainer defining the tabs. A tab is a
 key and an array of sectionsprotected void clearTabSectionsContents()
public NSArray sectionsForCurrentTab()
public ERD2WContainer currentTab()
ERD2WContainer defining the current tab.public void setCurrentTab(ERD2WContainer value)
protected static NSArray tabSectionsContentsFromRuleResult(NSArray tabSectionContentsFromRule)
public boolean isEmbedded()
public String displayVariant()
displayVariant for the current property key.  The intention is that the display variant
 allows variation in the display method of property keys without needing different, slightly varying,
 displayPropertyKeys or tabSectionsContents rules.  Template support has been added for
 the omit and blank variants.  One could imagine others, such as collapsed,
 ajax, etc.public boolean isKeyOmitted()
omitted.public NSTimestamp now()
public WOComponent nextPage()
public void setNextPage(WOComponent wocomponent)
setNextPage in class D2WPageprotected WOComponent nextPageFromDelegate()
public com.webobjects.directtoweb.NextPageDelegate nextPageDelegate()
NextPageDelegate,
 if any, checking for a "nextPageDelegate" binding if no delegate
 has been explicitly set.nextPageDelegate in class D2WPagepublic void setNextPageDelegate(com.webobjects.directtoweb.NextPageDelegate nextpagedelegate)
setNextPageDelegate in class D2WPagepublic ERDBranchDelegateInterface pageController()
  100: (entity.name='WebSite') and (task = 'list') => pageController = "ListWebSiteController" [er.directtoweb.ERDDelayedObjectCreationAssignment]
  100: (entity.name='WebSite') => actions = {left = (editAction, controllerAction);}
  100: (propertyKey = 'controllerAction') => componentName = "ERDControllerButton"
 
 public class ListWebSiteController extends ERDBranchDelegate {
 
     private WOComponent _sender;
 
     private WOComponent sender() {
         return _sender;
     }
 
     private void setSender(WOComponent aSender) {
         _sender = aSender;
     }
 
     private D2WContext d2wContext() {
         return (D2WContext) sender().valueForKey("d2wContext");
     }
 
     private EOEnterpriseObject object() {
         return (EOEnterpriseObject) d2wContext().valueForKey("object");
     }
 
     // first action, show up as "Copy Web Site"
     public WOComponent copyWebSite(WOComponent sender) {
        setSender(sender);
        WOComponent result = ....
        return result;
     }
 
     // second action, show up as "Delete Web Site"
     public WOComponent deleteWebSite(WOComponent sender) {
        setSender(sender);
        WOComponent result = ....
        return result;
     }
 }
 public void setPageController(ERDBranchDelegateInterface aPageController)
public boolean showCancel()
showCancel in class D2WPagepublic NSDictionary settings()
public String pageWrapperName()
PageWrapper if a value is not found from the D2W rules.pageWrapperName in class D2WPagepublic <T extends WOComponent> T pageWithName(Class<T> componentClass)
T - the type of component to createcomponentClass - the Class of the component to loadpublic boolean isTopLevelPage()
public boolean shouldDisplayDetailedPageMetrics()
public boolean shouldDisplayPageMetricsSummary()
public String statsKeyForCurrentPropertyKey()
protected String makeStatsKey(String key)
key - to formatpublic String statsKeyPrefix()
public ERXStats.LogEntry latestEntryForCurrentPropertyKey()
public long aggregateEventDurationForCurrentPropertyKey()
public NSDictionary statsForPage()
public String cssClassForPageContainerElement()
public String cssClassForPropertyName()
public String cssClassForPropertyKey()
public String inlineStyleDeclarationForPropertyName()
public String inlineStyleDeclarationForPropertyKey()
Copyright © 2002 – 2025 Project Wonder.