Apple WebObjects 3.5 Bedienungsanleitung Seite 108

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 120
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 107
Chapter 3 Creating a WebObjects Database Application
108
6. Check the “Fetches on load” box.
When “Fetches on load” is selected, the display group fetches its objects as
soon as the component is loaded into the application. You want this feature
in the MovieDetails page so that users are immediately presented with the
selected movie’s roles. In contrast, the Main page does not fetch on load; it
shouldn’t present a list of movies until the user has entered search criteria
and clicked Match.
7. Click OK.
8. In Project Builder, modify MovieDetail’s
setSelectedMovie method to look like
the following:
public void setSelectedMovie(EnterpriseObject newSelectedMovie) {
selectedMovie = newSelectedMovie;
// Add this line.
movieRoleDisplayGroup.setMasterObject(newSelectedMovie);
}
With this addition, whenever a user navigates to the MovieDetails page,
setSelectedMovie updates the movieRoleDisplayGroups master object so it displays
the corresponding MovieRole objects.
Adding a Repetition
Now you’ll extend the user interface of the MovieDetails component to display
the actors in the selected movie. Because different movies have different
numbers of roles, you need the dynamism of a repetition element. When you’re
done adding the repetition, your component should look like this:
Seitenansicht 107
1 2 ... 103 104 105 106 107 108 109 110 111 112 113 ... 119 120

Kommentare zu diesen Handbüchern

Keine Kommentare