Connecting Components to Event Handlers

Use the Event wizard to connect an application's user interface component's to event handlers.

You can either connect a component to existing application business logic, for example a previously created MCO, or create a new MCO or other type of business logic to which to connect this component. For example, in the case of a button click that calls a MCO to validate a form:

You can use the event wizard to:

Or

To manage component events, follow these steps:

1.  To access the Manage Events wizard either:

The Manage Component Events dialog appears.

(Any event handlers already specified for events for this component appear in the Handler column of this dialog.)

2. Complete the Manage Component Events dialog as follows:

image\img00062.gif

Figure 39: Manage Component Events dialog

Markup File: Specifies the name of the file that contains the selected component.

Component: Specifies the component type and the text of the selected component in parenthesis.

Event: Click on the type of event to configure for this component.

Handler: Add, Edit, or Remove a handler for the selected event type.

  • Add: Click Add to create a new event type. The Configure Event Handler dialog appears.

  • Edit: Click Edit to modify an existing event handler. The Configure Event Handler dialog appears.

  • Remove: Click Remove to delete an event handler from an event type.

 

3. To add or edit an event handler, click Add or select a listed handler and click Edit.

 The Configure Event Handler dialog appears. Complete this dialog as follows:

image\img00063.gif

Figure 40: Configure Event Handler dialog

Component: Displays the component type and the text of the selected component in parenthesis.

Event: Displays the selected event type for which you add/edit a handler.

Configure an event handler

Click the radio button beside one of the event handler options.

  • For Create a new handler or Select an existing handler, click the radio button and then click Next.
    Displays the Select Handler dialog from which you select the type of resource (MCO, Macro, JavaServer Page, Project Servlet, or XModify file) to either create as a new event handler or select an existing resource of this type as the event handler for the selected component-event.
    See the
    following sections Creating a New Handler or Existing Handler.

  • For Specify Handler or Use File for Handler, click the radio button and then complete the field that appears beneath the option and then click Finish.
    Specify Handler: Use Ctrl+space-bar to specify the appropriate syntax to associate an event handler with this component-event.
    Use File for Handler: Use Ctrl+space-bar or browse for a file to use as the event handler for this component-event.