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.
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.
- 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.
- 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.
- Write a container/wrapper class for your JavaBean. (You can use the JDeveloper
product to perform this general task.) More specifically:
- 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.
- 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.
Related topics
Including a JavaBean and Custom Controls
Communicating with a JavaBean
Item Type property
Implementation Class