Connecting Business Logic to the User Interface

Use the Event wizard to connect an application's business logic to a user interface component's event handler.

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\img00289.gif

Figure 32: Manage Component Events dialog

Component Description

Filename: Specifies the name of the file that contains the selected component.

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

Configure handlers

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 Edit and complete the Configure Event Handler dialog as follows:

image\img00290.gif

Figure 33: Configure Event Handler dialog

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

Event: Displays the selected event type for which you add 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. A new dialog appears. See the following sections Create 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.

Create New Handler: Displays the Create a New Handler page from which you select the type of resource (MCO, Macro, JavaServer Page, Project Servlet, or XModify file) to create as the event handler for the selected component-event.

Select Existing Handler: Displays a list of existing resources that you can use as an event handler for this component-event.

Specify Handler: Specify the appropriate syntax to associate an event handler with this component-event.

Use File for Handler: Specify or browse for a file to use as the event handler for this component-event.