PATH |
D2WEditRelationshipPage
Package: com.webobjects.directtowebInherits from:D2WPage
Implements:
- EditRelationshipPageInterface
- com.webobjects.directtoweb.generation.DTWGeneration
Subclasses:
Class Description
This class provides the behavior for the edit-relationship page Direct to Web templates, specifically
Most of the methods in this class are accessed (via the .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
- displayQueryAction
- newObjectAction
- queryAction
- removeFromToManyRelationshipAction
- removeFromToOneRelationshipAction
- returnAction
- saveAction
- selectAction
Key-Value Coding
- browserStringForItem
- displayList
- displayNameForRelationshipKey
- displayNew
- displayQuery
- newObjectInRelationship
- objectToAddToRelationship
- setObjectToAddToRelationship
- toOneDescription
Private Methods
- awake
- displayKey
- editingContextShouldValidateChanges
- replacementAssociationForAssociation
- setEditingContext
- setMasterObjectAndRelationshipKey
- sleep
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.webobjects.eocontrol.EOEnterpriseObject
The iteration variable bound to the
item
attribute of the WOBrowser on the edit-relationship page.browserSelections
com.webobjects.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.webobjects.appserver.WODisplayGroup
Contains the display group (a
selectDataSource
com.webobjects.eocontrol.EODataSource
Contains the data source (an
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
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
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
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
newObjectInRelationship
public EOEnterpriseObject newObjectInRelationship()
Returns the
objectToAddToRelationship
public EOEnterpriseObject objectToAddToRelationship()
Returns the
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
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
null
.
© 2001 Apple Computer, Inc.