WebObjects 5.4.2

com.webobjects.directtoweb
Class D2WEditToManyRelationship

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.EditRelationship
                  extended by com.webobjects.directtoweb.D2WEditToManyRelationship
All Implemented Interfaces:
WOActionResults, DTWGeneration, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, Cloneable

public class D2WEditToManyRelationship
extends EditRelationship

D2WEditToManyRelationship is a property-level component that allows the user to choose which objects are in a to-many relationship. Since the component fetches all of the objects in the relationship, it is slower than the D2WEditToManyFault component.

You can specify whether the list is collapsible or not and whether the user interface is a browser or a table of checkboxes. You can also specify the size of the browser or number of columns of checkboxes 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:
D2WEditToManyFault, D2WCustomComponent, D2WEditToOneRelationship, 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
D2WEditToManyRelationship(WOContext aContext)
          Creates an instance of D2WEditToManyRelationship with the specified context.
 
Method Summary
 NSArray list()
          Gets the destination objects of the to-many relationship specified by the property key.
 String methodNameToManyDescription()
          Provides the name of the template method that corresponds to the method toManyDescription.
 String plurifiedStrings()
          Contributes to the template method that corresponds to the method toManyDescription.
 WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation, String oldBinding, DTWTemplate aTemplate, WOContext aContext)
          Replaces the binding toManyDescription.
 String toManyDescription()
          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, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

D2WEditToManyRelationship

public D2WEditToManyRelationship(WOContext aContext)
Creates an instance of D2WEditToManyRelationship with the specified context.

Parameters:
aContext - instance of WOContext
See Also:
EditRelationship.EditRelationship(WOContext)
Method Detail

list

public NSArray list()
Gets the destination objects of the to-many relationship specified by the property key.

Returns:
instance of NSArray
See Also:
D2WEditToManyRelationship.toManyDescription(), D2WComponent.propertyKey()

toManyDescription

public String toManyDescription()
Provides the closed label for a collapsible component.

The current implementation returns the concatenation of the number of destination objects and the name of the destination entity, if there are any objects; the string "N/A", otherwise.

The implementation is subject to change in future releases.

Returns:
instance of String
See Also:
D2WEditToManyRelationship.list(), Services.plurify(String, int)

methodNameToManyDescription

public String methodNameToManyDescription()
Provides the name of the template method that corresponds to the method toManyDescription.

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

The implementation is subject to change in future releases.

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

plurifiedStrings

public String plurifiedStrings()
Contributes to the template method that corresponds to the method toManyDescription.

The implementation is subject to change in future releases.

Returns:
part of the definition of toManyDescription
See Also:
D2WEditToManyRelationship.toManyDescription(), D2WEditToManyRelationship.methodNameToManyDescription(), D2WEditToManyRelationship.replacementAssociationForAssociation(WOAssociation, String, DTWTemplate, WOContext)

replacementAssociationForAssociation

public WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation,
                                                          String oldBinding,
                                                          DTWTemplate aTemplate,
                                                          WOContext aContext)
Replaces the binding toManyDescription.

The implementation is subject to change in future releases.

Specified by:
replacementAssociationForAssociation in interface DTWGeneration
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:
D2WEditToManyRelationship.toManyDescription(), D2WEditToManyRelationship.methodNameToManyDescription(), EditRelationship.replacementAssociationForAssociation(WOAssociation, String, DTWTemplate, WOContext)

Last updated June 2008

Copyright © 2000-2008 Apple Inc.