beautypg.com

Navigating from main to moviedetails, Navigating from main to moviedetails 94 – Apple WebObjects 3.5 User Manual

Page 94

background image

Chapter 3

Creating a WebObjects Database Application

94

Movie isn’t actually a class; it’s an entity. It’s listed in the combo box as a
type along with entries for all the entities in your model. When you choose
an entity as the type for your variable, WebObjects Builder recognizes that
the variable is an enterprise object. Using information in the model,
WebObjects Builder can determine the entity’s corresponding enterprise
object class and the properties of that class.

4. Check the “An instance variable” box.

5. Check the “A method returning the value” box.

6. Check the “A method setting the value” box.

7. Click Add.

Navigating from Main to MovieDetails

To get to the MovieDetails page from the Main page, users use a hyperlink.
Clicking the hyperlink should set MovieDetail’s

selectedMovie

variable and then

open the MovieDetails page.

1. Add a hyperlink at the bottom of the Main component.

2. Replace the text “Hyperlink” with “Movie Details.”

3. Choose Add Action from the pull-down menu.

4. In the Add Action panel, type

showDetails

in the Name field.

5. Type

MovieDetails

in the “Page returned” field.

6. Click Add.

7. Bind the

showDetails

action to the hyperlink’s

action

attribute.

Add the hyperlink below
the horizontal rule.