Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > Getting Started With WebObjects


   

Bindings in the Repetition Part

In the repetition part of the component where matching movies are listed, movieDisplayGroup.displayedObjects is bound to a repetition. More specifically, displayedObjects is bound to the repetition's list attribute, providing an array of movies for the repetition to iterate over.

The movie variable is bound to the repetition's item attribute to hold each movie in turn, and movie.title is bound to the string element inside the repetition. These bindings produce a list of movie titles.

The repetition's string element is enclosed in a hyperlink. By clicking a movie title, the user selects the corresponding movie.

  1. Inspect the hyperlink.`

    Its action attribute is bound to the action method selectObject.

  2. Look in the Main.java class to see how the selectObject method is implemented.`

    The method (shown below) simply sets the selected object of movieDisplayGroup to the movie the user clicked.

    public void selectObject() {
    movieDisplayGroup.selectObject(movie);
    }


© 1999 Apple Computer, Inc. – (Last Updated 24 Aug 99)