WebObjects 5.2

com.webobjects.directtoweb
Class D2WEditToOneRelationship

java.lang.Object
  |
  +--com.webobjects.appserver.WOElement
        |
        +--com.webobjects.appserver.WOComponent
              |
              +--com.webobjects.directtoweb.D2WComponent
                    |
                    +--com.webobjects.directtoweb.EditRelationship
                          |
                          +--com.webobjects.directtoweb.D2WEditToOneRelationship
All Implemented Interfaces:
Cloneable, com.webobjects.directtoweb.generation.DTWGeneration, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, WOActionResults

public class D2WEditToOneRelationship
extends EditRelationship

D2WEditToOneRelationship is a property-level component that allows the user to choose the destination object of a to-one relationship. Since the component fetches all of the objects that can appear in the relationship, this component is slower than the D2WEditToOneFault component.

You can specify whether the user interface is a browser, pop-up list, or table of radio buttons. You can also specify the size of the browser or the number of columns of radio buttons to display.

Property-level components are not accessed programmatically. Instead, you use the Web Assistant or Rule Editor to choose the property-level component that Direct to Web uses to display a property on a particular entity and task page.

If you want to create a property-level component to edit a property, use D2WCustomComponent.

See Also:
D2WEditToOneFault, D2WCustomComponent, D2WEditToManyRelationship, Serialized Form

Inner classes inherited from class com.webobjects.appserver.WOComponent
WOComponent.Event
 
Inner classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Inner classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Inner classes inherited from class com.webobjects.foundation.NSValidation
NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
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
D2WEditToOneRelationship(WOContext aContext)
          Creates an instance of D2WEditToOneRelationship with the specified context.
 
Method Summary
 String generatedToOneDescription()
          Contributes to the template method that corresponds to the method toOneDescription.
 String methodNameToOneDescription()
          Provides the name of the template method that corresponds to the method toOneDescription.
 WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation, String oldBinding, com.webobjects.directtoweb.generation.DTWTemplate aTemplate, WOContext aContext)
          Replaces the binding toOneDescription.
 Object toOneDescription()
          Provides the closed label for a collapsible component.
 
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, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

D2WEditToOneRelationship

public D2WEditToOneRelationship(WOContext aContext)
Creates an instance of D2WEditToOneRelationship with the specified context.
Parameters:
aContext - instance of WOContext
See Also:
EditRelationship.EditRelationship(WOContext)
Method Detail

generatedToOneDescription

public String generatedToOneDescription()
Contributes to the template method that corresponds to the method toOneDescription.

The implementation is subject to change in future releases.

Returns:
part of the definition of toOneDescription
See Also:
toOneDescription(), methodNameToOneDescription(), replacementAssociationForAssociation(WOAssociation, String, DTWTemplate, WOContext)

methodNameToOneDescription

public String methodNameToOneDescription()
Provides the name of the template method that corresponds to the method toOneDescription.

The current implementation concatenates "titleFor" and the property key.

The implementation is subject to change in future releases.

Returns:
instance of String
See Also:
toOneDescription(), generatedToOneDescription(), replacementAssociationForAssociation(WOAssociation, String, DTWTemplate, WOContext), D2WComponent.propertyKey()

replacementAssociationForAssociation

public WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation,
                                                          String oldBinding,
                                                          com.webobjects.directtoweb.generation.DTWTemplate aTemplate,
                                                          WOContext aContext)
Replaces the binding toOneDescription.

The implementation is subject to change in future releases.

Overrides:
replacementAssociationForAssociation in class EditRelationship
Parameters:
oldAssociation - instance of WOAssociation
oldBinding - instance of String
aTemplate - instance of DTWTemplate
aContext - instance of WOContext
Returns:
instance of WOAssociation
See Also:
toOneDescription(), methodNameToOneDescription(), EditRelationship.replacementAssociationForAssociation(WOAssociation, String, DTWTemplate, WOContext)

toOneDescription

public Object toOneDescription()
Provides the closed label for a collapsible component. Will be a presentable description if keyWhenRelationship equals the string userPresentableDescription.

The implementation is subject to change in future releases.

Returns:
instance of String
See Also:
D2WComponent.keyWhenRelationship(), EOEnterpriseObject.userPresentableDescription()

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.