WebObjects 5.2

com.webobjects.directtoweb
Class D2WErrorPage

java.lang.Object
  |
  +--com.webobjects.appserver.WOElement
        |
        +--com.webobjects.appserver.WOComponent
              |
              +--com.webobjects.directtoweb.D2WComponent
                    |
                    +--com.webobjects.directtoweb.D2WPage
                          |
                          +--com.webobjects.directtoweb.D2WErrorPage
All Implemented Interfaces:
Cloneable, com.webobjects.directtoweb.generation.DTWGeneration, ErrorPageInterface, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, WOActionResults
Direct Known Subclasses:
BASErrorPage, NEUErrorPage, WOLErrorPage

public class D2WErrorPage
extends D2WPage
implements ErrorPageInterface, com.webobjects.directtoweb.generation.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

Inner classes inherited from class com.webobjects.appserver.WOComponent
WOComponent.Event
 
Inner classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Inner classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Inner classes inherited from class com.webobjects.foundation.NSValidation
NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Fields inherited from class com.webobjects.directtoweb.D2WComponent
currentObjectKey
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
KeyPathSeparator
 
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, com.webobjects.directtoweb.generation.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, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.webobjects.directtoweb.ErrorPageInterface
setNextPage
 

Constructor Detail

D2WErrorPage

public D2WErrorPage(WOContext aContext)
Constructs a D2WErrorPage with the specified context.
Parameters:
aContext - - the WOContext.
Method Detail

cancelAction

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.
Returns:
the component to display.
See Also:
D2WPage.nextPage(), D2WPage.nextPageDelegate()

firstLineOfMessage

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

formattedMessage

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

hasNextPage

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.
Returns:
true if nextPage or nextPageDelegate is set; false otherwise.

message

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

replacementAssociationForAssociation

public WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation,
                                                          String oldBinding,
                                                          com.webobjects.directtoweb.generation.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 com.webobjects.directtoweb.generation.DTWGeneration
Overrides:
replacementAssociationForAssociation in class D2WPage

setMessage

public void setMessage(String newValue)
Description copied from interface: ErrorPageInterface
Sets the message displayed by the error page.
Specified by:
setMessage in interface ErrorPageInterface
Following copied from interface: com.webobjects.directtoweb.ErrorPageInterface
Parameters:
errorMessage - text displayed in error page

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.