WebObjects 5.4.2

com.webobjects.directtoweb
Class D2WPage

java.lang.Object
  extended by com.webobjects.appserver.WOElement
      extended by com.webobjects.appserver.WOComponent
          extended by com.webobjects.directtoweb.D2WComponent
              extended by com.webobjects.directtoweb.D2WPage
All Implemented Interfaces:
WOActionResults, DTWGeneration, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, Cloneable
Direct Known Subclasses:
D2WConfirmPage, D2WEditRelationshipPage, D2WErrorPage, D2WInspectPage, D2WListPage, D2WMasterDetailPage, D2WQueryAllEntitiesPage, D2WQueryPage

public class D2WPage
extends D2WComponent

D2WPage is the parent class for the Direct to Web templates. It provides support for the next page mechanism, which determines the behavior when the user leaves the page. It also provides methods used by most or all of the Direct to Web templates, such as a data source, the page wrapper name, and a flag to indicate whether to show the cancel button or not. Most methods are accessed via the EOKeyValueCoding interface in the EOControl framework from the bindings (.wod) file of the Direct to Web templates. If you create your own Direct to Web template, 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.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent
WOComponent.Event
 
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
currentObjectKey
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
KeyPathSeparator
 
Constructor Summary
D2WPage(WOContext aContext)
          Constructs a new D2WPage with the specified context.
 
Method Summary
 boolean alternateRowColor()
          This method is intentionally undocumented.
 EODataSource dataSource()
          Returns the EODataSource, defined in the EOControl Framework, containing the objects displayed on the page or the objects that match the query for the query page subclasses.
 String descriptionForResponse(WOResponse r, WOContext c)
          This method is intentionally undocumented.
 NSMutableDictionary extraBindings()
          This method is intentionally undocumented.
 void finalize()
           
 WOComponent nextPage()
          Returns the next page of the receiver, a WOComponent, or null, if no next page has been specified.
 NextPageDelegate nextPageDelegate()
          Returns the next page delegate of the receiver, an object, or null, if no next page delegate has been specified.
 String pageWrapperName()
          Returns the name of the page wrapper component in which the receiver appears.
 WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation, String oldBinding, DTWTemplate aTemplate, WOContext aContext)
          This method is intentionally undocumented.
 void setDataSource(EODataSource newValue)
          Sets the EODataSource, defined in the EOControl Framework, containing the objects displayed on the page.
 void setExtraBindings(NSMutableDictionary extraBindings)
          This method is intentionally undocumented.
 void setNextPage(WOComponent nextPage)
          Sets the page that displays when the user clicks Return in the page.
 void setNextPageDelegate(NextPageDelegate nextPageDelegate)
          Sets the next page delegate of the receiver to the specified delegate.
 boolean showCancel()
          Returns whether or not the Cancel button is displayed on the page of the receiver.
 
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
 

Constructor Detail

D2WPage

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

Parameters:
aContext - - the WOContext.
Method Detail

nextPage

public WOComponent nextPage()
Returns the next page of the receiver, a WOComponent, or null, if no next page has been specified. Typically, this is invoked when the user leaves the page; the exact conditions under which it is invoked depends on the subclass of D2WPage that uses it. See the specification for the specific subclass for more information. You can override this method to customize the D2WPage behavior when the user leaves the page.

Returns:
the next page of the receiver if specified; null otherwise.

setNextPage

public void setNextPage(WOComponent nextPage)
Sets the page that displays when the user clicks Return in the page.

Parameters:
nextPage - - the WOComponent to display when the user clicks Return.

nextPageDelegate

public NextPageDelegate nextPageDelegate()
Returns the next page delegate of the receiver, an object, or null, if no next page delegate has been specified. Typically, the nextPage method is invoked on the next page delegate, if it has been specified, when the user leaves the page; the exact conditions under which it is invoked depends on the subclass of D2WPage that uses it. See the specification for the specific subclass for more information. If you do not specify a next page delegate, Direct to Web displays the WOComponent returned by the nextPage method. You can override the nextPageDelegate method or use the setNextPageDelegate method to customize the D2WPage behavior when the user leaves the page.

Returns:
- the next page delegate.
See Also:
D2WPage.nextPage(), D2WPage.setNextPageDelegate(NextPageDelegate)

setNextPageDelegate

public void setNextPageDelegate(NextPageDelegate nextPageDelegate)
Sets the next page delegate of the receiver to the specified delegate. Typically, the nextPage method is invoked on the next page delegate, if it has been specified, when the user leaves the page; the exact conditions under which it is invoked depends on the subclass of D2WPage that uses it. See the specification for the specific subclass for more information.

Parameters:
nextPageDelegate - - the delegate for the next page.

showCancel

public boolean showCancel()
Returns whether or not the Cancel button is displayed on the page of the receiver.

Returns:
- true if the Cancel button is displayed; false otherwise.

dataSource

public EODataSource dataSource()
Returns the EODataSource, defined in the EOControl Framework, containing the objects displayed on the page or the objects that match the query for the query page subclasses.

Returns:
- data source with objects being displayed or matching a query.

setDataSource

public void setDataSource(EODataSource newValue)
Sets the EODataSource, defined in the EOControl Framework, containing the objects displayed on the page.

Parameters:
newValue - - the data source to display.

alternateRowColor

public boolean alternateRowColor()
This method is intentionally undocumented. You should never have to invoke or customize it.


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.

Specified by:
replacementAssociationForAssociation in interface DTWGeneration
Overrides:
replacementAssociationForAssociation in class D2WComponent

descriptionForResponse

public String descriptionForResponse(WOResponse r,
                                     WOContext c)
This method is intentionally undocumented. You should never have to invoke or customize it.

Overrides:
descriptionForResponse in class WOComponent
Parameters:
r - the HTTP response that an application returns to a Web server to complete a cycle of the request-response loop
c - context of a transaction
Returns:
the information about the response component
See Also:
WOStatisticsStore

extraBindings

public NSMutableDictionary extraBindings()
This method is intentionally undocumented. You should never have to invoke or customize it.


setExtraBindings

public void setExtraBindings(NSMutableDictionary extraBindings)
This method is intentionally undocumented. You should never have to invoke or customize it.


pageWrapperName

public String pageWrapperName()
Returns the name of the page wrapper component in which the receiver appears. This key is resolved using the rule system.

Returns:
- the name of the page wrapper.

finalize

public void finalize()
              throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

Last updated June 2008

Copyright © 2000-2008 Apple Inc.