beautypg.com

Bindings in the editing part – Apple WebObjects 3.5 User Manual

Page 83

background image

Examining Your Project

83

1. Inspect the hyperlink.

Its

action

attribute is bound to the action method

selectObject

.

2. Look in the

Main.java

class to see how

selectObject

is implemented.

The method (shown below) simply sets

movieDisplayGroup

’s selected

object to the movie the user clicked.

public void selectObject() {

movieDisplayGroup.selectObject(movie);

}

Bindings in the Editing Part

The text fields in the editing part are all bound to attributes of the

movieDisplayGroup

’s

selectedObject

—the movie on which the user clicked.

Typing new values into these fields updates the Movie enterprise object.
To actually save the updated values to the database, the user must click the
“Save to database” button.