Creating the moviedetails component, Storing the selected movie, Creating the moviedetails component 93 – Apple WebObjects 3.5 User Manual
Page 93: Storing the selected movie 93

Adding the MovieDetails Page
93
Creating the MovieDetails Component
1. In Project Builder, choose File
m
New in Project.
2. In the New File panel, click the Web Components suitcase.
3. Type
MovieDetails
in the Name field.
4. Click OK.
5. In the wizard panel, choose None from the available assistance.
6. Choose Java as the component language.
7. Click Finish.
8. Open the new component in WebObjects Builder.
Storing the Selected Movie
Now, in the MovieDetails component, create a variable that holds the
application’s selected movie. Later on, you’ll add code to the
Main.java
class
that assigns Main’s selected movie to this variable.
1. Choose Add Variable/Method from the pull-down menu.
2. Name the variable
selectedMovie
.
3. Set the variable’s type to Movie.
Type the variable name here.
Select this.
Choose Movie.
Check each of these boxes.
Click here when you’re done.