Chapter 14 Working with Java
Adding an operation to the Bean class
After creation of the Bean class, you may need to create a method that is missing at this stage of the process, such as an internal method.
To add an operation to the Bean class:
- Double-click the Bean class to display its property sheet.
- Click the Operations tab to display the Operations page.
- Click a blank line in the list.
An arrow appears at the beginning of the line.
- Double-click the arrow at the beginning of the line.
A confirmation box asks you to commit the object creation.
- Click Yes.
The operation property sheet appears.
- Type a name and code for your operation.
- Click the Implementation tab to display the Implementation page.
The Implementation page opens to the Body tabbed page.
- Add the method code in this page.
- Click OK.
You return to the class property sheet.
- Click the Preview tab to display the Preview page.
You can now validate the to-be-generated Java code for the Bean class.
- Click OK.
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|