PATH Documentation > WebObjects

Up

D2WErrorPage

Package: com.webobjects.directtoweb

Inherits from:D2WPage

Implements:

Subclasses:


Class Description

This class provides the 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 of the methods in this class are accessed (via the EOKeyValueCoding interface defined in the EOControl framework) from the Direct to Web template's bindings (.wod) file. 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 the "Direct to Web" chapter of WebObjects Tools and Techniques for more information about creating a Direct to Web template.

Method Types


Constructors

Actions
Managing the Message
Managing the Next Page Parameters
Private Methods


Constructors


D2WErrorPage

public D2WErrorPage()

Standard Java no-argument constructor.
Methods


cancelAction

public WOComponent cancelAction()

This method is invoked when the user clicks Return. You can specify the component this action displays by overriding nextPage. Alternatively, you can override nextPageDelegate; in this case, nextPage is ignored.

See Also:
nextPage (D2WPage)
nextPageDelegate (D2WPage)



firstLineOfMessage

public String firstLineOfMessage()

Returns a String containing a truncated version of the receiver's error message that fits on a single line.



formattedMessage

public String formattedMessage()

Returns a String containing a version of the error message with line breaks added so it fits on the page.



hasNextPage

public boolean hasNextPage()

Returns whether nextPage or nextPageDelegate have been set in the receiver. If either is set, the error page can navigate to another page when the user clicks Return. Otherwise, the error page displays a hyperlink that starts a new session.



message

public String message()

Returns the error message displayed by the error page.



replacementAssociationForAssociation

public WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation, String oldBinding, DTWTemplate aTemplate, WOContext aContext)

This method is intentionally undocumented. You should never have to invoke or customize it.



setMessage

public void setMessage(String message)

Sets the error message displayed by the error page.



© 2001 Apple Computer, Inc.