Documentation Archive Developer
Search
Table of Contents Previous Section

Configuring a Repetition

Now configure MovieDetails' repetition in a way similar to the way Main's repetition is configured. First you need to create a new variable to bind to the repetition's item attribute.

  1. Use the Add Variable/Method command to add a new variable, movieRole, whose type is set to the MovieRole entity.

    Don't create set and get methods for movieRole. You won't need accessor methods because the variable is used only within the MovieDetails component and shouldn't be visible to any other classes.

  2. Bind movieRoleDisplayGroup.displayedObjects to the repetition's list attribute.

  3. Bind movieRole to the repetition's item attribute.

  4. Bind movieRole.talent.firstName to the value attribute of the first string in the repetition.

  5. Bind movieRole.talent.lastName to the value attribute of the second string.

  6. Bind movieRole.roleName to the value attribute of the last string.
When you're done, the repetition bindings should look like the following:

Running Movies

Be sure that all your project's files are saved (including the components in WebObjects Builder and the model in EOModeler), and build and run your application. In the Main page, select a movie and click the Movie Details link. Now, in addition to displaying all the movie's information, the Movie Details page should also display the movie's roles and actors.

Table of Contents Next Section