WebObjects 5.2

com.webobjects.directtoweb
Class D2WComponent

java.lang.Object
  |
  +--com.webobjects.appserver.WOElement
        |
        +--com.webobjects.appserver.WOComponent
              |
              +--com.webobjects.directtoweb.D2WComponent
All Implemented Interfaces:
Cloneable, com.webobjects.directtoweb.generation.DTWGeneration, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, WOActionResults
Direct Known Subclasses:
D2WCompactInspectComponent, D2WCustomComponent, D2WCustomQueryComponent, D2WDisplayToMany, D2WEditToManyFault, D2WHead, D2WKeyPathContainer, D2WPage, D2WRemoteControl, D2WStatelessComponent, D2WWebAssistantFrame, D2WWebAssistantPage, EditRelationship, EORuleComponent

public class D2WComponent
extends WOComponent
implements com.webobjects.directtoweb.generation.DTWGeneration

The D2WComponent class is the parent class for the Direct to Web templates and the property-level components. The components access a Direct to Web context with the d2wContext method. The D2WComponent class also defines several keys that are used in the binding (.wod) files for the Direct to Web templates. In addition, D2WComponent defines an action method, showWebAssistant, that opens the Web Assistant in the user's Web browser.

See Also:
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
 
Field Summary
static String currentObjectKey
          This constant is intentionally undocumented.
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
KeyPathSeparator
 
Constructor Summary
D2WComponent(WOContext aContext)
          Constructs a D2WComponent with the specified context.
 
Method Summary
 String allEntities()
          This method is intentionally undocumented.
 Integer allowCollapsing()
          This method is intentionally undocumented.
 int applicationPort()
          This method is intentionally undocumented.
 int assistantPort()
          This method is intentionally undocumented.
 EOAttribute attribute()
          This method is intentionally undocumented.
 String backgroundColorForHeaderRow()
          Returns the background color for the header rows of tables rendered by Direct to Web.
 String backgroundColorForPage()
          This method is intentionally undocumented.
 String backgroundColorForTable()
          Returns the background color for tables rendered in this component.
 String backgroundColorForTableDark()
          This method is intentionally undocumented.
 String backgroundColorForTableLight()
          This method is intentionally undocumented.
 String color()
          This method is intentionally undocumented.
 String currentSettings()
          This method is intentionally undocumented.
 String currentUrl()
          Returns a String containing the URL for the current page.
 D2WContext d2wContext()
          Returns the Direct to Web context of the receiver.
 String d2wContextVisibleEntityNamesCountPlus1()
          Returns a String containing the number of visible entities in the Direct to Web context of the receiver incremented by one.
 String defaultRowspan()
          Returns the number of HTML table rows spanned by the vertical rule in the page containing the Direct to Web context in which the rule of the receiver fires.
 String displayNameForKeyWhenRelationship()
          Returns a String containing the name of a property that represents the destination object of the current relationship in the Direct to Web context of the receiver.
 String displayNameForProperty()
          Returns a String containing a user-presentable name for the current property in the Direct to Web context of the component.
 NSArray displayPropertyKeys()
          Returns an NSArray containing the keys (Strings) for all visible properties of the current entity in the components Direct to Web context.
 String dynamicPages()
          This method is intentionally undocumented.
 EOEntity entity()
          Returns the current entity in the Direct to Web context of the receiver.
 String entityName()
          Returns a String containing the name of the entity displayed by this component.
 String formatter()
          This method is intentionally undocumented.
protected  String generationReplacementFor(String variableName)
          This method is intentionally undocumented.
 String generationReplacementForCurrentObject()
          This method is intentionally undocumented.
 boolean hasCustomKey(String customKey)
          This method is intentionally undocumented.
 boolean hasEntity()
          Returns whether the Direct to Web context of the receiver has an entity.
 boolean hasNoColor()
          This method is intentionally undocumented.
 WOComponent homeClicked()
          This method is intentionally undocumented.
 String homeHref()
          Returns a String containing the URL of the home page (the Main component) of the application.
 boolean isEditing()
          This method is intentionally undocumented.
 boolean isEntityReadOnly()
          Returns whether the current entity in the Direct to Web context of the receiver can be modified or not.
 boolean isEntityReadOnly(EOEntity e)
          This method is intentionally undocumented.
 boolean isLiveAssistantEnabled()
          Deprecated.  
 boolean isNotBoldAsBoolean()
          This method is intentionally undocumented.
 boolean isNotItalicAsBoolean()
          This method is intentionally undocumented.
 boolean isPropertyAnAttribute()
          Returns true if the property in the Direct to Web context of the receiver is an attribute (and not a relationship).
 boolean isWebAssistantActive()
          This method is intentionally undocumented.
 boolean isWebAssistantConnected()
          This method is intentionally undocumented.
 boolean isWebAssistantEnabled()
          This method is intentionally undocumented.
static String keyForGenerationReplacementForVariableNamed(String variableName)
          This method is intentionally undocumented.
 String keyWhenRelationship()
          This method is intentionally undocumented.
 String lastUrl()
          Returns a String containing the URL for the last page.
 String length()
          This method is intentionally undocumented.
 D2WContext localContext()
          Deprecated.  
 WOComponent logout()
          Is invoked when the user clicks Logout in the menu bar.
 EOEnterpriseObject object()
          Returns the EOEnterpriseObject, defined in the EOControl Framework, displayed by this component.
 Object objectPropertyValue()
          Returns the value of the current property for the object that the receiver displays.
 boolean objectPropertyValueIsNonNull()
          This method is intentionally undocumented.
 String pageTitle()
          This method is intentionally undocumented.
 Object property()
          This method is intentionally undocumented.
 String propertyKey()
          Returns the key corresponding to the current property in the Direct to Web context of the receiver.
 String propertyValueClassName()
          Returns a String containing the name of the class for the values of the current attribute (for example, "NSString").
 EORelationship relationship()
          Returns the EORelationship, defined in the EOAccess Framework, for the current property in the Direct to Web context of the receiver, or null if the property is not a relationship.
 WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation, String oldBinding, com.webobjects.directtoweb.generation.DTWTemplate aTemplate, WOContext aContext)
           
 String resourcePathURL()
          This method is intentionally undocumented.
 String sessionID()
          This method is intentionally undocumented.
 void setCurrentSettings(String newValue)
          This method is intentionally undocumented.
 void setDynamicPages(String newValue)
          This method is intentionally undocumented.
 void setEntities(String newValue)
          This method is intentionally undocumented.
 void setEntity(EOEntity newValue)
          This method is intentionally undocumented.
 void setEntityName(String newValue)
          This method is intentionally undocumented.
 void setLocalContext(D2WContext newValue)
          Sets the Direct to Web context for this component to newValue.
 void setObject(EOEnterpriseObject eo)
          Sets the EOEnterpriseObject, defined in the EOControl Framework, that the receiver manipulates to the specified object.
 void setPropertyKey(String newValue)
          This method is intentionally undocumented.
 void setResourcePathURL(String newValue)
          This method is intentionally undocumented.
 void setTask(String newValue)
          This method is intentionally undocumented.
 void setTasks(String newValue)
          This method is intentionally undocumented.
 boolean showBanner()
          Returns whether the banner should be shown in this component.
 WOComponent showWebAssistant()
           
 String submitActionName()
          The name of an action method that is called when the user clicks a submit button within the form.
 String target()
          This method is intentionally undocumented.
 String task()
          Returns a String containing the current task in the Direct to Web context of the receiver.
 String tasks()
          This method is intentionally undocumented.
 NSArray visibleEntityNames()
          Returns an NSArray of the names of entities visible in the application.
 
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
 

Field Detail

currentObjectKey

public static final String currentObjectKey
This constant is intentionally undocumented.
Constructor Detail

D2WComponent

public D2WComponent(WOContext aContext)
Constructs a D2WComponent with the specified context.
Parameters:
aContext - - the WOContext.
Method Detail

allEntities

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

allowCollapsing

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

applicationPort

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

assistantPort

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

attribute

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

backgroundColorForHeaderRow

public String backgroundColorForHeaderRow()
Returns the background color for the header rows of tables rendered by Direct to Web.
Returns:
the background color for header rows of tables.

backgroundColorForPage

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

backgroundColorForTable

public String backgroundColorForTable()
Returns the background color for tables rendered in this component. This key is resolved using the rule system.
Returns:
the background color for tables.

backgroundColorForTableDark

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

backgroundColorForTableLight

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

color

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

currentSettings

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

currentUrl

public String currentUrl()
Returns a String containing the URL for the current page.
Returns:
the URL for the current page.

d2wContext

public D2WContext d2wContext()
Returns the Direct to Web context of the receiver.
Returns:
the local Direct to Web context.

d2wContextVisibleEntityNamesCountPlus1

public String d2wContextVisibleEntityNamesCountPlus1()
Returns a String containing the number of visible entities in the Direct to Web context of the receiver incremented by one.
Returns:
the number of visible entities incremented by one.

defaultRowspan

public String defaultRowspan()
Returns the number of HTML table rows spanned by the vertical rule in the page containing the Direct to Web context in which the rule of the receiver fires.

The query and inspect pages in the WebObjects look use this method.

Returns:
the number of HTML table rows spanned by the vertical rule.

displayNameForKeyWhenRelationship

public String displayNameForKeyWhenRelationship()
Returns a String containing the name of a property that represents the destination object of the current relationship in the Direct to Web context of the receiver. Returns null if the current property in the Direct to Web context of the component is not a relationship. The name is derived from the key for one of the properties of the destination entity that can be used to represent that entity. For example, the representative key for Studio could be name. This method determines the key using the rule system. To convert the key to a user-presentable name, the method capitalizes lowercase words and inserts spaces between words with mixed case (for example, "firstName" becomes "First Name").
Returns:
name of a property representing the current destination object.

displayNameForProperty

public String displayNameForProperty()
Returns a String containing a user-presentable name for the current property in the Direct to Web context of the component. The method derives the name from the property key by capitalizing lowercase words and inserting spaces between words with mixed case (for example, "firstName" becomes "First Name").
Returns:
a user-presentable name for the current property.

displayPropertyKeys

public NSArray displayPropertyKeys()
Returns an NSArray containing the keys (Strings) for all visible properties of the current entity in the components Direct to Web context. The method determines the result using the rule system.

You can hide a property or make it visible with the Web Assistant.

Returns:
an NSArray of keys of visible properties of the current entity.

dynamicPages

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

entity

public EOEntity entity()
Returns the current entity in the Direct to Web context of the receiver. The EOEntity class is defined in the EOAccess Framework.
Returns:
the current entity.

entityName

public String entityName()
Returns a String containing the name of the entity displayed by this component.
Returns:
the name of the displayed entity.

formatter

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

generationReplacementFor

protected String generationReplacementFor(String variableName)
This method is intentionally undocumented. You should never have to invoke or customize it.

generationReplacementForCurrentObject

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

hasCustomKey

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

hasEntity

public boolean hasEntity()
Returns whether the Direct to Web context of the receiver has an entity.
Returns:
true if the context has an entity; false otherwise.

hasNoColor

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

homeClicked

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

homeHref

public String homeHref()
Returns a String containing the URL of the home page (the Main component) of the application.
Returns:
the URL of the home page.

isEditing

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

isEntityReadOnly

public boolean isEntityReadOnly()
Returns whether the current entity in the Direct to Web context of the receiver can be modified or not. You can specify if an entity can be modified using the Web Assistant.
Returns:
true if the current entity can be modified; false otherwise.

isEntityReadOnly

public boolean isEntityReadOnly(EOEntity e)
This method is intentionally undocumented. You should never have to invoke or customize it.

isLiveAssistantEnabled

public boolean isLiveAssistantEnabled()
Deprecated.  

This method is intentionally undocumented. You should never have to invoke or customize it.

isNotBoldAsBoolean

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

isNotItalicAsBoolean

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

isPropertyAnAttribute

public boolean isPropertyAnAttribute()
Returns true if the property in the Direct to Web context of the receiver is an attribute (and not a relationship).
Returns:
true if the property is an attribute and not a relationship; false otherwise.

isWebAssistantActive

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

isWebAssistantConnected

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

isWebAssistantEnabled

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

keyForGenerationReplacementForVariableNamed

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

keyWhenRelationship

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

lastUrl

public String lastUrl()
Returns a String containing the URL for the last page.
Returns:
the URL for the last page.

length

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

localContext

public D2WContext localContext()
Deprecated.  

This method is deprecated. Use d2wContext instead.

logout

public WOComponent logout()
Is invoked when the user clicks Logout in the menu bar. Terminates current session and returns the home page (Main) WOComponent.
Returns:
the home page.

object

public EOEnterpriseObject object()
Returns the EOEnterpriseObject, defined in the EOControl Framework, displayed by this component.
Returns:
the EOEnterpriseObject displayed by this component.

objectPropertyValue

public Object objectPropertyValue()
Returns the value of the current property for the object that the receiver displays. For example, if the current entity in the Direct to Web context of the component is "Movie" and the current property key is "title", this returns the title of the movie displayed in this component.
Returns:
the value of the current property object.

objectPropertyValueIsNonNull

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

pageTitle

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

property

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

propertyKey

public String propertyKey()
Returns the key corresponding to the current property in the Direct to Web context of the receiver.
Returns:
the key of the current property in the d2wcontext.

propertyValueClassName

public String propertyValueClassName()
Returns a String containing the name of the class for the values of the current attribute (for example, "NSString"). Returns null if the current property in the Direct to Web context of the component is not an attribute.
Returns:
the class name for the current property.

relationship

public EORelationship relationship()
Returns the EORelationship, defined in the EOAccess Framework, for the current property in the Direct to Web context of the receiver, or null if the property is not a relationship.
Returns:
the relationship if the current property is a relationship; null otherwise.

replacementAssociationForAssociation

public WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation,
                                                          String oldBinding,
                                                          com.webobjects.directtoweb.generation.DTWTemplate aTemplate,
                                                          WOContext aContext)
Specified by:
replacementAssociationForAssociation in interface com.webobjects.directtoweb.generation.DTWGeneration

resourcePathURL

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

sessionID

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

setCurrentSettings

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

setDynamicPages

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

setEntities

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

setEntity

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

setEntityName

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

setLocalContext

public void setLocalContext(D2WContext newValue)
Sets the Direct to Web context for this component to newValue.
Parameters:
newValue - - the new local context.

setObject

public void setObject(EOEnterpriseObject eo)
Sets the EOEnterpriseObject, defined in the EOControl Framework, that the receiver manipulates to the specified object.
Parameters:
eo - - the EOEnterpriseObject of the receiver.

setPropertyKey

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

setResourcePathURL

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

setTask

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

setTasks

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

showBanner

public boolean showBanner()
Returns whether the banner should be shown in this component. If the component is an embedded component, the banner is not shown.
Returns:
true if the banner should be shown; false otherwise.

showWebAssistant

public WOComponent showWebAssistant()

submitActionName

public String submitActionName()
The name of an action method that is called when the user clicks a submit button within the form. This action method is used in the tab panel components, NEUTabInspectPage and WOLTabInspectPage, to specify the submitActionName binding of the WOTabPanel.

target

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

task

public String task()
Returns a String containing the current task in the Direct to Web context of the receiver.
Returns:
a String containing the current task.

tasks

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

visibleEntityNames

public NSArray visibleEntityNames()
Returns an NSArray of the names of entities visible in the application. You can choose which entities are visible using the Web Assistant.
Returns:
an NSarry of the names of the visible entities.

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

Copyright © 2003 Apple Computer, Inc.