A script-enabled browser is required for this page to function properly.

How to Add JavaBeans by Writing Your Own Java Code

Follow these general steps to add a JavaBean to your WebForms application. Both the form and the Java component require some special coding.

In your form:

Within your form at design time, create a Bean Area as an item (Item Type property). The end user will see the JavaBean in this item in the user interface.

  1. In this Bean Area item, set its Implementation Class property to name the Java container/wrapper class you will create for your JavaBean. (See Java steps below.) This name must be fully-qualified (that is, oracle.forms.-----). This name establishes the primary connection between your form and your JavaBean.
  2. If communication will be needed with the JavaBean while it is running, code Set_Custom_Property Built-ins and When-Custom-Item-Event triggers in your form to send and receive information.

In your Java component:

  1. Write a container/wrapper class for your JavaBean. (You can use the JDeveloper product to perform this general task.) More specifically:
  2. Compile the container/wrapper class you wrote in step 1. The compiler should be on the same ClassPath as the WebForms Java components, pointing to either the Java directory or the WebForms JAR file.
  3. Store the JavaBean and its class so that the WebServer can find them at runtime. It is usually more efficient to have them on the server machine than on the end-user client. The WebForms applet codebase directory is the first location searched, followed by the ClassPath of the server.

Including a JavaBean and Custom Controls

Communicating with a JavaBean

Item Type property

Implementation Class