PATH
Documentation > WebObjects 4.5 >
Direct to Web
D2WEditRelationshipPage
Package:
Inherits from:D2WPage
Implements:
Subclasses:
Class Description
This class provides the behavior for the edit-relationship page Direct to Web templates, specifically BASEditRelationshipPage, NEUEditRelationshipPage, and WOLEditRelationshipPage. The classes for these components inherit directly from D2WEditRelationshipPage 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 edit-relationship 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
Static Constants
Fields
Actions
Key-Value Coding
Private Methods
Constructors
D2WEditRelationshipPage
public D2WEditRelationshipPage()
Standard Java no-argument constructor.
Static Constants
LIST
int
This constant is intentionally undocumented.
NEW
int
This constant is intentionally undocumented.
QUERY
int
This constant is intentionally undocumented.
Fields
browserItem
com.apple.yellow.eocontrol.EOEnterpriseObject
The iteration variable bound to the item
attribute of the WOBrowser on the edit-relationship page.
browserSelections
com.apple.yellow.foundation.NSArray
Contains the selections the user chooses with the WOBrowser on the edit-relationship page.
isRelationshipToMany
boolean
Contains true
if the relationship is a to-many relationship or false
if the relationship is a to-one relationship.
relationshipDisplayGroup
com.apple.yellow.webobjects.WODisplayGroup
Contains the display group (a WODisplayGroup) with the relationship's destination objects.
selectDataSource
com.apple.yellow.eocontrol.EODataSource
Contains the data source (an EODataSource) that holds the possible destination objects for the relationship.
Methods
awake
public void awake()
This method is intentionally undocumented. You should never have to invoke or customize it.
browserStringForItem
public String browserStringForItem()
Returns a String containing a user-presentable name corresponding to receiver's browserItem
variable. This string appears in the edit-relationship page's WOBrowser.
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.
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 relationship's key.
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.
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.
displayQueryAction
public WOComponent displayQueryAction()
This action method is invoked when the user clicks Search. It returns an edit-relationship page (a WOComponent) 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()
This action method is invoked when the user clicks New in the edit-relationship page. It returns an edit-relationship page (a WOComponent) 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.
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.
queryAction
public WOComponent queryAction()
This action method is invoked when the user clicks the Search button in the query component of the edit-relationship page. It returns an edit-relationship page (a WOComponent) with a select component.
removeFromToManyRelationshipAction
public WOComponent removeFromToManyRelationshipAction()
This action method is invoked when the user clicks Remove in an edit-relationship page for a to-many relationship.
removeFromToOneRelationshipAction
public WOComponent removeFromToOneRelationshipAction()
This action method is invoked when the user clicks Remove in an edit-relationship page for a to-one relationship.
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.
returnAction
public WOComponent returnAction()
This action method is invoked when the user clicks Return. It saves the edited relationship to the database. You can specify the component this action displays by overriding nextPage
. You can also specify custom behavior for this action by overriding nextPageDelegate
; in this case, nextPage
is ignored.See Also:
nextPage (D2WPage)
nextPageDelegate (D2WPage)
saveAction
public WOComponent saveAction()
This action method is invoked with the user clicks 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.
selectAction
public WOComponent selectAction()
This action method 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.
setEditingContext
protected void setEditingContext(EOEditingContext anEditingContext)
This method is intentionally undocumented. You should never have to invoke or customize it.
setMasterObjectAndRelationshipKey
public void setMasterObjectAndRelationshipKey(EOEnterpriseObject object, String key)
This method is intentionally undocumented. You should never have to invoke or customize it.
setObjectToAddToRelationship
public void setObjectToAddToRelationship(EOEnterpriseObject objectToAdd)
Sets the object the object that is added to the relationship. This is also the object that the user selects in the edit-relationship page's select component.
sleep
public void sleep()
This method is intentionally undocumented. You should never have to invoke or customize it.
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
.