| PATH |

Setting the Property Key
When the template begins to render the query fields for the
entity's attributes and relationships (like the category and the
release date) it encounters the WORepetition labeled ResourceRepetition.
See Listing 3-4 and Listing 3-5. The WORepetition's list attribute
is bound to d2wContext.displayPropertyKeys.
Since displayPropertyKeys is
not in its dictionary, the Direct to Web context resolves the key
using the rule engine, which causes the following rule to fire:
*true* => displayPropertyKeys = "defaultPropertyKeysFromEntity"
The defaultPropertyKeysFromEntity key
refers to a method that derives a value based on the Direct to Web
context's dictionary. See "The Rule System" for more information
about the how derived values are handled. The defaultPropertyKeysFromEntity method
returns an NSArray containing the Movie entity's property keys,
which resolves the WORepetition's list binding.
As the repetition iterates, it sets the item attribute
for each of the objects in the list. The first object is the string
"category". Since item is
bound to d2wContext.propertyKey,
the Direct to Web context sets the value for propertyKey in
its dictionary to "category". At the same time, it sets the
value for the attribute key
to the category EOAttribute
and the value for the relationship key
to null, since a Movie's category property
is an attribute and not a relationship. Now the Direct to Web Context
dictionary contains the information listed in Table 3-7.
| Key | Value |
task |
"query" |
entity |
<EOEntity Movie> |
propertyKey |
"category" |
attribute |
<EOAttribute category> |
relationship |
null |

© 2001 Apple Computer, Inc.