New Event Handler

Use this dialog box to generate template code for new event handlers. The template includes the basic code for the events associated with a specific event handler type.

Click any of the event handler object types below for information about the events associated with each type.

Model Operation
Life Cycle Recordset
Entity Recordset Field
Attribute Procedure

Adding an Event Handler

  1. You can open the New Event Handler dialog box from several locations.
  2. After providing a name or confirming the provided name, add any necessary description and comments. Click OK to create a Java source file template based on the handler type. The name you provide must follow Java naming conventions. You'll see an error message when you click OK if your name does not meet these requirements.

    The source file is compiled and the output is added to a JAR file used with the model (by default, vhi_model.jar in the \models\<modelname>\scripts\lib folder).

  3. After creating and compiling the code, edit the event handler source code. Click Open for Editing to have the editor open automatically when the compilation is complete.

    Host Integrator includes an ant script that compiles source files located within the Design Tool directory structure. You can modify the ant script (build.xml).

New Event Handler Settings

Java Class Name

The Java Class Name can be either a simple class name or a fully qualified name (prepended package name). A default name associated with the event handler type is provided. If a package name is supplied, it becomes the default package name for this model.


Use Description to provide additional information about the event handler in the Design Tool user interface.


Any information entered here is included as a block comment near the top of the generated event handler source file.

Open for editing

Select this check box to open a source code editor for the event handler after the source code has been edited and compiled and the class file has been added to the event handler JAR file.