Managing a WODisplayGroup's Selection
Remember how clicking a movie title in the Main page selects the corresponding Movie object in movieDisplayGroup. MovieDetails has a similar behavior for selecting a MovieRole object in movieRoleDisplayGroup. First you need to add a hyperlink element around the repetition's role name string so that users can select a particular MovieRole. When a user clicks one of the movie role hyperlinks, the application should select the corresponding MovieRole object in the movieRoleDisplayGroup.-
Select the repetition's role name string element.
-
Click the Add WOHyperlink button in the toolbar to add a hyperlink element around the string.
Now you need to create an action method to invoke when the hyperlink is clicked.
-
Use the Add Action command in the pull-down list to add an action named selectObject, returning null.
-
Bind the selectObject method to the hyperlink's action attribute.
-
Now write the code for selectObject in MovieDetail.java. Modify the selectObject action to look like the following:
public WOComponent selectObject() {
movieRoleDisplayGroup.selectObject(movieRole);
return null;
}
© 1999 Apple Computer, Inc. (Last Updated 24 Aug 99)