| PATH |

Resolving Keys That Depend on the Property
As the WebObjects framework continues to render the ResourceRepetition WORepetition, it
encounters the ResourceLabel WOString.
See Listing 3-4. The value attribute
is bound to d2wContext.displayNameForProperty.
This causes the following rule to fire:
*true* => displayNameForProperty = "defaultDisplayNameForProperty"
The derived value for the defaultDisplayNameForProperty key
is implemented by a method that capitalizes the property key in
the context's dictionary, inserts spaces between words with mixed
case, and returns the resulting name "Category", which the template
displays.
Next, the template displays the property-level component that
queries for the category attribute.
Since this component is known only at runtime, the Direct to Web
template displays it with a WOSwitchComponent called ResourceInputRepresentation.
See Listing 3-5.
The WOSwitchComponent's WOComponentName attribute
is bound to d2wContext.componentName.
When the context evaluates this key, the following rule fires:
((task = "query") and (not(attribute = null))
and (attribute.valueClassName = "NSString")
=> componentName = "D2WQueryStringComponent"
Thus the WOSwitchComponent displays a D2WQueryStringComponent.wo reusable component
from the DirectToWeb framework.
The rest of the template renders in a similar way.

© 2001 Apple Computer, Inc.