WebObjects 5.2.3

com.webobjects.directtoweb
Class D2WEditRelationshipPage

java.lang.Object
  extended bycom.webobjects.appserver.WOElement
      extended bycom.webobjects.appserver.WOComponent
          extended bycom.webobjects.directtoweb.D2WComponent
              extended bycom.webobjects.directtoweb.D2WPage
                  extended bycom.webobjects.directtoweb.D2WEditRelationshipPage
All Implemented Interfaces:
Cloneable, com.webobjects.directtoweb.generation.DTWGeneration, EditRelationshipPageInterface, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, WOActionResults
Direct Known Subclasses:
BASEditRelationshipPage, NEUEditRelationshipPage, WOLEditRelationshipPage

public class D2WEditRelationshipPage
extends D2WPage
implements EditRelationshipPageInterface, com.webobjects.directtoweb.generation.DTWGeneration

The D2WEditRelationshipPage class provides the behavior for the edit-relationship page Direct to Web templates: BASEditRelationshipPage, NEUEditRelationshipPage, and WOLEditRelationshipPage. The classes for these components inherit directly from D2WEditRelationshipPage and define no additional methods or variables.

Most methods 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 edit-relationship page, you can invoke the methods in this class in the same way.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.webobjects.appserver.WOComponent
WOComponent.Event
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes inherited from class com.webobjects.foundation.NSValidation
NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Field Summary
 EOEnterpriseObject browserItem
          The iteration variable bound to the item attribute of the WOBrowser on the edit-relationship page.
 NSArray browserSelections
          Contains the selections the user chooses with the WOBrowser on the edit-relationship page.
 boolean isRelationshipToMany
          Returns true if the relationship is a to-many relationship or false if the relationship is a to-one relationship.
static int LIST
          This constant is intentionally undocumented.
static int NEW
          This constant is intentionally undocumented.
static int QUERY
          This constant is intentionally undocumented.
 WODisplayGroup relationshipDisplayGroup
          Contains the display group with the relationship destination objects.
 EODataSource selectDataSource
          Contains the data source that holds the possible destination objects for the relationship.
 
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
D2WEditRelationshipPage(WOContext aContext)
          Constructs a D2WEditRelationshipPage with the specified context.
 
Method Summary
 void awake()
          This method is intentionally undocumented.
 String browserStringForItem()
          Returns a String containing a user-presentable name corresponding to the browserItem variable of the receiver.
 String displayKey()
          This method is intentionally undocumented.
 boolean displayList()
          Returns whether or not the select component appears in the lower half of the edit-relationship page.
 String displayNameForRelationshipKey()
          Returns a String containing a user-presentable name for the relationship edited by the receiver.
 boolean displayNew()
          Returns whether or not the edit component appears in the lower half of the edit-relationship page.
 boolean displayQuery()
          Returns whether or not the query component appears in the lower half of the edit-relationship page.
 WOComponent displayQueryAction()
          Is invoked when the user clicks Search.
 boolean editingContextShouldValidateChanges(EOEditingContext editingContext)
          This method is intentionally undocumented.
 WOComponent newObjectAction()
          Is invoked when the user clicks New in the edit-relationship page.
 EOEnterpriseObject newObjectInRelationship()
          Returns the EOEnterpriseObject, defined in the EOControl Framework, that is created when the user clicks New.
 EOEnterpriseObject objectToAddToRelationship()
          Returns the EOEnterpriseObject, defined in the EOControl Framework, that is added to the relationship edited by the receiver.
 WOComponent queryAction()
          Is invoked when the user clicks the Search button in the query component of the edit-relationship page.
 WOComponent removeFromToManyRelationshipAction()
          Is invoked when the user clicks Remove in an edit-relationship page for a to-many relationship.
 WOComponent removeFromToOneRelationshipAction()
          Is invoked when the user clicks Remove in an edit-relationship page for a to-one relationship.
 WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation, String oldBinding, com.webobjects.directtoweb.generation.DTWTemplate aTemplate, WOContext aContext)
          This method is intentionally undocumented.
 WOComponent returnAction()
          Is invoked when the user clicks Return.
 WOComponent saveAction()
          Is invoked when the user clicks the Save in the edit component of the edit-relationship page.
 WOComponent selectAction()
          Is invoked when the user clicks the Select button next to an object in the select component.
protected  void setEditingContext(EOEditingContext newEditingContext)
          This method is intentionally undocumented.
 void setMasterObjectAndRelationshipKey(EOEnterpriseObject eo, String relationshipKey)
          This method is intentionally undocumented.
 void setNewObjectInRelationship(Object arg)
          This method is intentionally undocumented.
 void setObjectToAddToRelationship(EOEnterpriseObject newValue)
          Sets the object that is added to the relationship.
 void sleep()
          This method is intentionally undocumented.
 String toOneDescription()
          Returns a String representing the destination object of the relationship edited by the receiver if the relationship is a to-one relationship.
 
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, 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, 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.EditRelationshipPageInterface
setNextPage, setNextPageDelegate
 

Field Detail

LIST

public static final int LIST
This constant is intentionally undocumented.

See Also:
Constant Field Values

NEW

public static final int NEW
This constant is intentionally undocumented.

See Also:
Constant Field Values

QUERY

public static final int QUERY
This constant is intentionally undocumented.

See Also:
Constant Field Values

browserItem

public EOEnterpriseObject browserItem
The iteration variable bound to the item attribute of the WOBrowser on the edit-relationship page.


browserSelections

public NSArray browserSelections
Contains the selections the user chooses with the WOBrowser on the edit-relationship page.


isRelationshipToMany

public boolean isRelationshipToMany
Returns true if the relationship is a to-many relationship or false if the relationship is a to-one relationship.


relationshipDisplayGroup

public WODisplayGroup relationshipDisplayGroup
Contains the display group with the relationship destination objects.


selectDataSource

public EODataSource selectDataSource
Contains the data source that holds the possible destination objects for the relationship.

Constructor Detail

D2WEditRelationshipPage

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

Parameters:
aContext - - the WOContext.
Method Detail

awake

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

Overrides:
awake in class WOComponent
See Also:
WOComponent.ensureAwakeInContext(WOContext aContext), WOComponent.sleep()

browserStringForItem

public String browserStringForItem()
Returns a String containing a user-presentable name corresponding to the browserItem variable of the receiver. This string appears in the WOBrowser of the edit-relationship page.

Returns:
a user-presentable name for the browser item.

displayKey

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


displayList

public boolean displayList()
Returns whether or not the select component appears in the lower half of the edit-relationship page. Recall that the select component is actually a list component.

Returns:
true if the select component appears; false otherwise.

displayNameForRelationshipKey

public String displayNameForRelationshipKey()
Returns a String containing a user-presentable name for the relationship edited by the receiver. The method derives the result by capitalizing the first character of the key for the relationship.

Returns:
a user-presentable name for the relationship.

displayNew

public boolean displayNew()
Returns whether or not the edit component appears in the lower half of the edit-relationship page. The edit component allows the user to enter properties for a new destination object for the relationship.

Returns:
true if the edit component appears; false otherwise.

displayQuery

public boolean displayQuery()
Returns whether or not the query component appears in the lower half of the edit-relationship page. The query component allows the user to query for destination objects to add to the relationship.

Returns:
true if the query component appears; false otherwise.

displayQueryAction

public WOComponent displayQueryAction()
Is invoked when the user clicks Search. Returns an edit-relationship page with an embedded query component.

Returns:
the edit-relationship page with an embedded query component.

editingContextShouldValidateChanges

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


newObjectAction

public WOComponent newObjectAction()
Is invoked when the user clicks New in the edit-relationship page. Returns an edit-relationship page with an embedded edit component.

Returns:
the edit-relationship page with an embedded edit component.

newObjectInRelationship

public EOEnterpriseObject newObjectInRelationship()
Returns the EOEnterpriseObject, defined in the EOControl Framework, that is created when the user clicks New. The edit component of the edit-relationship page edits this object.

Returns:
the EOEnterpriseObject created when the user clicks New.

objectToAddToRelationship

public EOEnterpriseObject objectToAddToRelationship()
Returns the EOEnterpriseObject, defined in the EOControl Framework, that is added to the relationship edited by the receiver. This is also the object the user selects in the select component.

Returns:
the EOEnterpriseObject added to the relationship.

queryAction

public WOComponent queryAction()
Is invoked when the user clicks the Search button in the query component of the edit-relationship page. Returns an edit-relationship page with a select component.

Returns:
the edit-relationship page.

removeFromToManyRelationshipAction

public WOComponent removeFromToManyRelationshipAction()
Is invoked when the user clicks Remove in an edit-relationship page for a to-many relationship.

Returns:
the edit-relationship page.

removeFromToOneRelationshipAction

public WOComponent removeFromToOneRelationshipAction()
Is invoked when the user clicks Remove in an edit-relationship page for a to-one relationship.

Returns:
the edit-relationship 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

returnAction

public WOComponent returnAction()
Is invoked when the user clicks Return. It saves the edited relationship to the database. Override nextPage to specify the component this action displays. You can also specify custom behavior for this action by overriding nextPageDelegate; in this case, nextPage is ignored.

Returns:
the edit-relationship page with an embedded query component.

saveAction

public WOComponent saveAction()
Is invoked when the user clicks the Save in the edit component of the edit-relationship page. The edit component appears in the page when the user creates a new destination object for the relationship.

Returns:
the edit-relationship page.

selectAction

public WOComponent selectAction()
Is invoked when the user clicks the Select button next to an object in the select component. The select component appears in the edit-relationship page after the user performs a query.

Returns:
the edit-relationship page.

setEditingContext

protected void setEditingContext(EOEditingContext newEditingContext)
This method is intentionally undocumented. You should never have to invoke or customize it.


setMasterObjectAndRelationshipKey

public void setMasterObjectAndRelationshipKey(EOEnterpriseObject eo,
                                              String relationshipKey)
This method is intentionally undocumented. You should never have to invoke or customize it.

Specified by:
setMasterObjectAndRelationshipKey in interface EditRelationshipPageInterface
Parameters:
eo - object to edit the relationship on
relationshipKey - name of relationship to edit on eo

setNewObjectInRelationship

public void setNewObjectInRelationship(Object arg)
This method is intentionally undocumented. You should never have to invoke or customize it.


setObjectToAddToRelationship

public void setObjectToAddToRelationship(EOEnterpriseObject newValue)
Sets the object that is added to the relationship. This is also the object that the user selects in the select component of the edit-relationship page.

Parameters:
newValue - - the EOEnterpriseObject to add to the relationship.

sleep

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

Overrides:
sleep in class WOComponent
See Also:
WOComponent.awake()

toOneDescription

public String toOneDescription()
Returns a String representing the destination object of the relationship edited by the receiver if the relationship is a to-one relationship. Otherwise returns null.

Returns:
a String representing the destination of a to-one relationship.

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.