WebObjects 5.4.2

Class D2WErrorPage

  extended by com.webobjects.appserver.WOElement
      extended by com.webobjects.appserver.WOComponent
          extended by com.webobjects.directtoweb.D2WComponent
              extended by com.webobjects.directtoweb.D2WPage
                  extended by com.webobjects.directtoweb.D2WErrorPage
All Implemented Interfaces:
WOActionResults, ErrorPageInterface, DTWGeneration, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, Cloneable
Direct Known Subclasses:
BASErrorPage, NEUErrorPage, WOLErrorPage

public class D2WErrorPage
extends D2WPage
implements ErrorPageInterface, DTWGeneration

The D2WErrorPage class provides behavior for the error page Direct to Web templates, specifically BASErrorPage, NEUErrorPage, and WOLErrorPage. The classes for these pages inherit directly from D2WErrorPage and define no additional methods or variables. Most methods are accessed, via the EOKeyValueCoding interface defined in EOControl, from the bindings (.wod) file of the Direct to Web template. If you create a Direct to Web template from an error page, you can invoke the methods in this class in the same way.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
Field Summary
Fields inherited from class com.webobjects.directtoweb.D2WComponent
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
Constructor Summary
D2WErrorPage(WOContext aContext)
          Constructs a D2WErrorPage with the specified context.
Method Summary
 WOComponent cancelAction()
          Is invoked when the user clicks Return.
 String firstLineOfMessage()
          Returns a String containing a truncated version of the error message that fits on a single line.
 String formattedMessage()
          Returns a String containing a version of the error message with line breaks added so that it fits on the page.
 boolean hasNextPage()
          Returns whether nextPage or nextPageDelegate has been set.
 String message()
          Returns the message displayed by the error page.
 WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation, String oldBinding, DTWTemplate aTemplate, WOContext aContext)
          This method is intentionally undocumented.
 void setMessage(String newValue)
          Sets the message displayed by the error page.
Methods inherited from class com.webobjects.directtoweb.D2WPage
alternateRowColor, dataSource, descriptionForResponse, extraBindings, finalize, nextPage, nextPageDelegate, pageWrapperName, setDataSource, setExtraBindings, setNextPage, setNextPageDelegate, showCancel
Methods inherited from class com.webobjects.directtoweb.D2WComponent
allEntities, allowCollapsing, applicationPort, assistantPort, attribute, backgroundColorForHeaderRow, backgroundColorForPage, backgroundColorForTable, backgroundColorForTableDark, backgroundColorForTableLight, color, currentSettings, currentUrl, d2wContext, d2wContextVisibleEntityNamesCountPlus1, defaultRowspan, displayNameForKeyWhenRelationship, displayNameForProperty, displayPropertyKeys, dynamicPages, entity, entityName, formatter, generationReplacementFor, generationReplacementForCurrentObject, hasCustomKey, hasEntity, hasNoColor, homeClicked, homeHref, isEditing, isEntityReadOnly, isEntityReadOnly, isLiveAssistantEnabled, isNotBoldAsBoolean, isNotItalicAsBoolean, isPropertyAnAttribute, isWebAssistantActive, isWebAssistantConnected, isWebAssistantEnabled, keyForGenerationReplacementForVariableNamed, keyWhenRelationship, lastUrl, length, localContext, logout, object, objectPropertyValue, objectPropertyValueIsNonNull, pageTitle, property, propertyKey, propertyValueClassName, relationship, resourcePathURL, sessionID, setCurrentSettings, setDynamicPages, setEntities, setEntity, setEntityName, setLocalContext, setObject, setPropertyKey, setResourcePathURL, setTask, setTasks, showBanner, showWebAssistant, submitActionName, target, task, tasks, visibleEntityNames
Methods inherited from class com.webobjects.appserver.WOComponent
appendToResponse, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, setVariableValueForName, sleep, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithName
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.webobjects.directtoweb.ErrorPageInterface

Constructor Detail


public D2WErrorPage(WOContext aContext)
Constructs a D2WErrorPage with the specified context.

aContext - - the WOContext.
Method Detail


public String message()
Returns the message displayed by the error page.

the message displayed by the error page.


public void setMessage(String newValue)
Description copied from interface: ErrorPageInterface
Sets the message displayed by the error page.

Specified by:
setMessage in interface ErrorPageInterface
newValue - text displayed in error page


public String formattedMessage()
Returns a String containing a version of the error message with line breaks added so that it fits on the page.

the line-wrapped error message.


public String firstLineOfMessage()
Returns a String containing a truncated version of the error message that fits on a single line.

the truncated error message.


public boolean hasNextPage()
Returns whether nextPage or nextPageDelegate has been set. If so, the error page can go to another page when the user clicks Return. Otherwise, the error page displays a hyperlink that starts a new session.

true if nextPage or nextPageDelegate is set; false otherwise.


public WOComponent cancelAction()
Is invoked when the user clicks Return. Override nextPage to specify the component this action displays. Or, override nextPageDelegate, in which case nextPage is ignored.

the component to display.
See Also:
D2WPage.nextPage(), D2WPage.nextPageDelegate()


public WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation,
                                                          String oldBinding,
                                                          DTWTemplate aTemplate,
                                                          WOContext aContext)
Description copied from class: D2WPage
This method is intentionally undocumented. You should never have to invoke or customize it.

Specified by:
replacementAssociationForAssociation in interface DTWGeneration
replacementAssociationForAssociation in class D2WPage

Last updated June 2008

Copyright © 2000-2008 Apple Inc.