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.

Steps To add an operation to the Bean class:

  1. Double-click the Bean class to display its property sheet.
  2. Click the Operations tab to display the Operations page.
  3. Click a blank line in the list.

    An arrow appears at the beginning of the line.
  4. Double-click the arrow at the beginning of the line.

    A confirmation box asks you to commit the object creation.
  5. Click Yes.

    The operation property sheet appears.
  6. Type a name and code for your operation.
  7. Click the Implementation tab to display the Implementation page.

    The Implementation page opens to the Body tabbed page.
  8. Add the method code in this page.
  9. Click OK.

    You return to the class property sheet.
  10. Click the Preview tab to display the Preview page.

    You can now validate the to-be-generated Java code for the Bean class.
  11. Click OK.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.