Adding Custom Behavior to Talent
Now add the fullName method to Talent and bind it to the browser.
- Open Talent.java in Project Builder.
- Add the method, fullName, as follows.
- Bind talent.fullName to the browser's value attribute.
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.
public String fullName() { return firstName() + " " + lastName(); }
After you save, fullName appears in the object browser of WebObjects Builder as a property of Talent.
Table of Contents Next Section