WebObjects 5.4.2

com.webobjects.directtoweb
Class D2WComponent

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

public class D2WComponent
extends WOComponent
implements 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

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
static String currentObjectKey
          This constant is intentionally undocumented.
 
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, 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, 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
 

Field Detail

currentObjectKey

public static final String currentObjectKey
This constant is intentionally undocumented.

See Also:
Constant Field Values
Constructor Detail

D2WComponent

public D2WComponent(WOContext aContext)
Constructs a D2WComponent with the specified context.

Parameters:
aContext - - the WOContext.
Method Detail

localContext

@Deprecated
public D2WContext localContext()
Deprecated. 

This method is deprecated. Use d2wContext instead.


d2wContext

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

Returns:
the local Direct to Web context.

setLocalContext

public void setLocalContext(D2WContext newValue)
Sets the Direct to Web context for this component to newValue.

Parameters:
newValue - - the new local context.

keyForGenerationReplacementForVariableNamed

public static String keyForGenerationReplacementForVariableNamed(String variableName)
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.


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.

setPropertyKey

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


object

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

Returns:
the EOEnterpriseObject displayed by this component.

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.

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.


attribute

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


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.

property

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


objectPropertyValueIsNonNull

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


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.

keyWhenRelationship

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


target

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


formatter

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


length

public String length()
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.


pageTitle

public String pageTitle()
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.

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.

setTask

public void setTask(String newValue)
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.

setEntity

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


entityName

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

Returns:
the name of the displayed entity.

setEntityName

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


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.

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.

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.

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.

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.


color

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


hasNoColor

public boolean hasNoColor()
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.


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.

backgroundColorForPage

public String backgroundColorForPage()
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.

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.


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.

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.

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.

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.

isEditing

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


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.


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.

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.

resourcePathURL

public String resourcePathURL()
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.


tasks

public String tasks()
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.


dynamicPages

public String dynamicPages()
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.


allEntities

public String allEntities()
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.


currentSettings

public String currentSettings()
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.


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.


sessionID

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


showWebAssistant

public WOComponent showWebAssistant()

isWebAssistantConnected

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


isWebAssistantActive

public boolean isWebAssistantActive()
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.


isLiveAssistantEnabled

@Deprecated
public boolean isLiveAssistantEnabled()
Deprecated. 

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.

lastUrl

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

Returns:
the URL for the last page.

replacementAssociationForAssociation

public WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation,
                                                          String oldBinding,
                                                          DTWTemplate aTemplate,
                                                          WOContext aContext)
Specified by:
replacementAssociationForAssociation in interface DTWGeneration

Last updated June 2008

Copyright © 2000-2008 Apple Inc.