Adding Custom Behavior to Talent
Now add the fullName method to Talent and bind it to the browser.-
Open Talent.java in Project Builder.
The class file declares instance variables for all of Talent's class properties (firstName and lastName) and implements set and get methods for those instance variables.
-
Add the method, fullName, as follows.
public String fullName(){
return firstName() + " " + lastName();
}After you save, fullName appears in the object browser of WebObjects Builder as a property of Talent.
- Bind talent.fullName to the browser's value attribute.
© 1999 Apple Computer, Inc. (Last Updated 24 Aug 99)