An event handler gives you the ability to customize the behavior of a model.
The Design Tool offers a variety of features that assist you in creating event handlers. The result is a Java class that conforms to rules for event handling. This class is then mapped (attached) to specific objects of a model to customize its behavior.
You can attach event handlers to events associated with the entire model, a life cycle event, or to entities, attributes, operations, recordsets and recordset fields, and procedures. You can reuse a handler in multiple models or with multiple objects of the same type within the same model.
Use these basic steps to create an event handler:
The procedure for testing the event handler will vary according to the type of event you are creating. You can review a sample event handler that reformats currency amounts in recordset fields to learn about these steps.